projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f20a91f
)
mlxsw: switchx2: Set physical device for port netdevice
author
Jiri Pirko
<jiri@mellanox.com>
Thu, 27 Oct 2016 13:13:01 +0000
(15:13 +0200)
committer
David S. Miller
<davem@davemloft.net>
Fri, 28 Oct 2016 17:45:52 +0000
(13:45 -0400)
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>
drivers/net/ethernet/mellanox/mlxsw/switchx2.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/mellanox/mlxsw/switchx2.c
b/drivers/net/ethernet/mellanox/mlxsw/switchx2.c
index
938e22d
..
dc3c5ed
100644
(file)
--- 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;