Skip to content

Commit

Permalink
net/mlx4_en: Expose port number through sysfs
Browse files Browse the repository at this point in the history
Initialize dev_port with port number (0 based) to be accessed through
sysfs from user space.

Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Amir Vadai authored and David S. Miller committed Feb 26, 2014
1 parent 3f85944 commit 76a066f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/ethernet/mellanox/mlx4/en_netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 76a066f

Please sign in to comment.