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

mlx4_en: use net_device dev_id to indicate port number

Today, there are no means to know which port of a hardware device a netdev
interface uses. struct net_device conatins a field, dev_id, that can be used
for that. Use this field to save the port number in ConnectX that is being used
by the net device; port numbers are zero based.

Signed-off-by: Eli Cohen <eli@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Eli Cohen and committed by
David S. Miller
741a00be 59297067

+1
+1
drivers/net/mlx4/en_netdev.c
··· 961 961 } 962 962 963 963 SET_NETDEV_DEV(dev, &mdev->dev->pdev->dev); 964 + dev->dev_id = port - 1; 964 965 965 966 /* 966 967 * Initialize driver private data