summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/sfc
diff options
context:
space:
mode:
authorShradha Shah <sshah@solarflare.com>2015-06-02 10:37:25 (GMT)
committerDavid S. Miller <davem@davemloft.net>2015-06-02 19:57:24 (GMT)
commit8be41320f346ee8bdcbbc866fcc8c4fdbcb6527d (patch)
tree47664b378472dcaae50a2cc460e306e7e0275731 /drivers/net/ethernet/sfc
parent41d3b5efe9a81aa93267533f9475b0948c0e6e0b (diff)
downloadlinux-8be41320f346ee8bdcbbc866fcc8c4fdbcb6527d.tar.xz
sfc: Add code to export port_num in netdev->dev_port
In the case where we have multiple functions (PFs and VFs), this sysfs entry is useful to identify the physical port corresponding to the function we are interested in. Signed-off-by: Shradha Shah <sshah@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sfc')
-rw-r--r--drivers/net/ethernet/sfc/ef10.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/sfc/ef10.c b/drivers/net/ethernet/sfc/ef10.c
index 4eb6ab7..06605ab 100644
--- a/drivers/net/ethernet/sfc/ef10.c
+++ b/drivers/net/ethernet/sfc/ef10.c
@@ -249,6 +249,7 @@ static int efx_ef10_get_mac_address_vf(struct efx_nic *efx, u8 *mac_address)
static int efx_ef10_probe(struct efx_nic *efx)
{
struct efx_ef10_nic_data *nic_data;
+ struct net_device *net_dev = efx->net_dev;
int i, rc;
/* We can have one VI for each 8K region. However, until we
@@ -329,6 +330,7 @@ static int efx_ef10_probe(struct efx_nic *efx)
if (rc < 0)
goto fail3;
efx->port_num = rc;
+ net_dev->dev_port = rc;
rc = efx->type->get_mac_address(efx, efx->net_dev->perm_addr);
if (rc)