From: Amir Vadai Date: Tue, 25 Feb 2014 16:17:51 +0000 (+0200) Subject: net/mlx4_en: Expose port number through sysfs X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=76a066f2a2a0268b565459c417b59724b5a3197b;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git net/mlx4_en: Expose port number through sysfs Initialize dev_port with port number (0 based) to be accessed through sysfs from user space. Signed-off-by: Amir Vadai Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c index fad45316200a..caa488a286f0 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c @@ -2342,6 +2342,7 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port, SET_NETDEV_DEV(dev, &mdev->dev->pdev->dev); dev->dev_id = port - 1; + dev->dev_port = port - 1; /* * Initialize driver private data