Commit 6602041b8343fcdb6433cc72ca6cb6c2e189da6d
Committed by
David S. Miller
1 parent
503b47eafc
Exists in
smarc-imx_3.14.28_1.0.0_ga
and in
1 other branch
sfc: Store port number in private data, not net_device::dev_id
We should not use net_device::dev_id to indicate the port number, as this affects the way the local part of IPv6 addresses is normally generated. This field was intended for use where multiple devices may share a single assigned MAC address and need to have different IPv6 addresses. Siena's two ports each have their own MAC addresses. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Showing 2 changed files with 3 additions and 2 deletions Side-by-side Diff
drivers/net/ethernet/sfc/net_driver.h
... | ... | @@ -784,6 +784,7 @@ |
784 | 784 | |
785 | 785 | char name[IFNAMSIZ]; |
786 | 786 | struct pci_dev *pci_dev; |
787 | + unsigned int port_num; | |
787 | 788 | const struct efx_nic_type *type; |
788 | 789 | int legacy_irq; |
789 | 790 | bool legacy_irq_enabled; |
... | ... | @@ -916,7 +917,7 @@ |
916 | 917 | |
917 | 918 | static inline unsigned int efx_port_num(struct efx_nic *efx) |
918 | 919 | { |
919 | - return efx->net_dev->dev_id; | |
920 | + return efx->port_num; | |
920 | 921 | } |
921 | 922 | |
922 | 923 | /** |
drivers/net/ethernet/sfc/siena.c