Commit 8be41320 authored by Shradha Shah's avatar Shradha Shah Committed by David S. Miller

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: default avatarShradha Shah <sshah@solarflare.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 41d3b5ef
...@@ -249,6 +249,7 @@ static int efx_ef10_get_mac_address_vf(struct efx_nic *efx, u8 *mac_address) ...@@ -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) static int efx_ef10_probe(struct efx_nic *efx)
{ {
struct efx_ef10_nic_data *nic_data; struct efx_ef10_nic_data *nic_data;
struct net_device *net_dev = efx->net_dev;
int i, rc; int i, rc;
/* We can have one VI for each 8K region. However, until we /* 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) ...@@ -329,6 +330,7 @@ static int efx_ef10_probe(struct efx_nic *efx)
if (rc < 0) if (rc < 0)
goto fail3; goto fail3;
efx->port_num = rc; efx->port_num = rc;
net_dev->dev_port = rc;
rc = efx->type->get_mac_address(efx, efx->net_dev->perm_addr); rc = efx->type->get_mac_address(efx, efx->net_dev->perm_addr);
if (rc) if (rc)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment