mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-09 15:24:32 +08:00
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>
This commit is contained in:
parent
f20a91f1cc
commit
71fac305fb
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user