mlxsw: spectrum: 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
1d20d23c59
commit
f20a91f1cc
|
@ -2222,6 +2222,7 @@ static int mlxsw_sp_port_create(struct mlxsw_sp *mlxsw_sp, u8 local_port,
|
|||
dev = alloc_etherdev(sizeof(struct mlxsw_sp_port));
|
||||
if (!dev)
|
||||
return -ENOMEM;
|
||||
SET_NETDEV_DEV(dev, mlxsw_sp->bus_info->dev);
|
||||
mlxsw_sp_port = netdev_priv(dev);
|
||||
mlxsw_sp_port->dev = dev;
|
||||
mlxsw_sp_port->mlxsw_sp = mlxsw_sp;
|
||||
|
|
Loading…
Reference in New Issue