Commit 71fac305 authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller

mlxsw: switchx2: Set physical device for port netdevice

Do this so the sysfs has "device" link correctly set.
Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
Reviewed-by: default avatarIdo Schimmel <idosch@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f20a91f1
...@@ -968,6 +968,7 @@ static int mlxsw_sx_port_create(struct mlxsw_sx *mlxsw_sx, u8 local_port) ...@@ -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)); dev = alloc_etherdev(sizeof(struct mlxsw_sx_port));
if (!dev) if (!dev)
return -ENOMEM; return -ENOMEM;
SET_NETDEV_DEV(dev, mlxsw_sx->bus_info->dev);
mlxsw_sx_port = netdev_priv(dev); mlxsw_sx_port = netdev_priv(dev);
mlxsw_sx_port->dev = dev; mlxsw_sx_port->dev = dev;
mlxsw_sx_port->mlxsw_sx = mlxsw_sx; mlxsw_sx_port->mlxsw_sx = mlxsw_sx;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment