aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/mlx4/en_netdev.c
diff options
context:
space:
mode:
authorEli Cohen <eli@mellanox.co.il>2010-05-26 15:56:24 -0400
committerDavid S. Miller <davem@davemloft.net>2010-05-31 03:27:45 -0400
commit741a00be1f6bfa027225f44703ab72a741b757b7 (patch)
tree429b2f8bb7bfbe3c656483544a3bdf3424b1addd /drivers/net/mlx4/en_netdev.c
parent592970675c9522bde588b945388c7995c8b51328 (diff)
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>
Diffstat (limited to 'drivers/net/mlx4/en_netdev.c')
-rw-r--r--drivers/net/mlx4/en_netdev.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/mlx4/en_netdev.c b/drivers/net/mlx4/en_netdev.c
index 96180c0ec206..a0d8a26f5a02 100644
--- a/drivers/net/mlx4/en_netdev.c
+++ b/drivers/net/mlx4/en_netdev.c
@@ -961,6 +961,7 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port,
961 } 961 }
962 962
963 SET_NETDEV_DEV(dev, &mdev->dev->pdev->dev); 963 SET_NETDEV_DEV(dev, &mdev->dev->pdev->dev);
964 dev->dev_id = port - 1;
964 965
965 /* 966 /*
966 * Initialize driver private data 967 * Initialize driver private data