aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJiri Pirko <jiri@mellanox.com>2016-10-27 15:13:00 +0200
committerDavid S. Miller <davem@davemloft.net>2016-10-28 13:45:52 -0400
commitf20a91f1cc70105852d029e642cef7c583f397d3 (patch)
tree7845fa9027b578743fb14d080e1ad2e0b2aae12d /drivers
parentmlxsw: Move PCI id table definitions into driver modules (diff)
downloadlinux-dev-f20a91f1cc70105852d029e642cef7c583f397d3.tar.xz
linux-dev-f20a91f1cc70105852d029e642cef7c583f397d3.zip
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/spectrum.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
index 780524065889..d652f7f030cb 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
@@ -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;