Skip to content

Commit

Permalink
sfc: Add code to export port_num in netdev->dev_port
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Shradha Shah authored and David S. Miller committed Jun 2, 2015
1 parent 41d3b5e commit 8be4132
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/ethernet/sfc/ef10.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 8be4132

Please sign in to comment.