aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlxsw/switchx2.c
diff options
context:
space:
mode:
authorJiri Pirko <jiri@mellanox.com>2016-10-27 15:13:01 +0200
committerDavid S. Miller <davem@davemloft.net>2016-10-28 13:45:52 -0400
commit71fac305fb78967b2c856848dead355262ba9e03 (patch)
tree0d6f72fc4417a09089dd55968c31d9f8adb284f4 /drivers/net/ethernet/mellanox/mlxsw/switchx2.c
parentmlxsw: spectrum: Set physical device for port netdevice (diff)
downloadlinux-dev-71fac305fb78967b2c856848dead355262ba9e03.tar.xz
linux-dev-71fac305fb78967b2c856848dead355262ba9e03.zip
mlxsw: switchx2: Set physical device for port netdevice
Do this so the sysfs has "device" link correctly set. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlxsw/switchx2.c')
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/switchx2.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/switchx2.c b/drivers/net/ethernet/mellanox/mlxsw/switchx2.c
index 938e22d14e11..dc3c5ed73ecd 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/switchx2.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/switchx2.c
@@ -968,6 +968,7 @@ static int mlxsw_sx_port_create(struct mlxsw_sx *mlxsw_sx, u8 local_port)
dev = alloc_etherdev(sizeof(struct mlxsw_sx_port));
if (!dev)
return -ENOMEM;
+ SET_NETDEV_DEV(dev, mlxsw_sx->bus_info->dev);
mlxsw_sx_port = netdev_priv(dev);
mlxsw_sx_port->dev = dev;
mlxsw_sx_port->mlxsw_sx = mlxsw_sx;