diff options
author | Jiri Pirko <jiri@mellanox.com> | 2016-10-27 15:13:01 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-10-28 13:45:52 -0400 |
commit | 71fac305fb78967b2c856848dead355262ba9e03 (patch) | |
tree | 0d6f72fc4417a09089dd55968c31d9f8adb284f4 /drivers | |
parent | f20a91f1cc70105852d029e642cef7c583f397d3 (diff) |
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')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlxsw/switchx2.c | 1 |
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; |