Skip to content

Commit 8be4132

Browse files
sshah-solarflaredavem330
authored andcommitted
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 41d3b5e commit 8be4132

File tree

1 file changed

+2
-0
lines changed
  • drivers/net/ethernet/sfc

1 file changed

+2
-0
lines changed

drivers/net/ethernet/sfc/ef10.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ static int efx_ef10_get_mac_address_vf(struct efx_nic *efx, u8 *mac_address)
249249
static int efx_ef10_probe(struct efx_nic *efx)
250250
{
251251
struct efx_ef10_nic_data *nic_data;
252+
struct net_device *net_dev = efx->net_dev;
252253
int i, rc;
253254

254255
/* 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)
329330
if (rc < 0)
330331
goto fail3;
331332
efx->port_num = rc;
333+
net_dev->dev_port = rc;
332334

333335
rc = efx->type->get_mac_address(efx, efx->net_dev->perm_addr);
334336
if (rc)

0 commit comments

Comments
 (0)