Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Shradha Shah and committed by
David S. Miller
8be41320 41d3b5ef

+2
+2
drivers/net/ethernet/sfc/ef10.c
··· 249 249 static int efx_ef10_probe(struct efx_nic *efx) 250 250 { 251 251 struct efx_ef10_nic_data *nic_data; 252 + struct net_device *net_dev = efx->net_dev; 252 253 int i, rc; 253 254 254 255 /* We can have one VI for each 8K region. However, until we ··· 330 329 if (rc < 0) 331 330 goto fail3; 332 331 efx->port_num = rc; 332 + net_dev->dev_port = rc; 333 333 334 334 rc = efx->type->get_mac_address(efx, efx->net_dev->perm_addr); 335 335 if (rc)