summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/mellanox/mlxsw/switchx2.c
diff options
context:
space:
mode:
authorJiri Pirko <jiri@mellanox.com>2019-04-03 15:24:18 +0300
committerDavid S. Miller <davem@davemloft.net>2019-04-05 03:42:36 +0300
commitcdf29f4a262527feb11cd0071f0b3cedceaba745 (patch)
treed4842d38f7478593e24ddf0868d063901b182749 /drivers/net/ethernet/mellanox/mlxsw/switchx2.c
parent7e1146e8c10c00f859843817da8ecc5d902ea409 (diff)
downloadlinux-cdf29f4a262527feb11cd0071f0b3cedceaba745.tar.xz
mlxsw: Pass switch ID through devlink_port_attrs_set()
Pass the switch ID down the to devlink through devlink_port_attrs_set() so it can be used by devlink_compat_switch_id_get(). Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlxsw/switchx2.c')
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/switchx2.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/switchx2.c b/drivers/net/ethernet/mellanox/mlxsw/switchx2.c
index 5312dc1f339b..5397616fcda8 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/switchx2.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/switchx2.c
@@ -1128,7 +1128,8 @@ static int mlxsw_sx_port_eth_create(struct mlxsw_sx *mlxsw_sx, u8 local_port,
int err;
err = mlxsw_core_port_init(mlxsw_sx->core, local_port,
- module + 1, false, 0);
+ module + 1, false, 0,
+ mlxsw_sx->hw_id, sizeof(mlxsw_sx->hw_id));
if (err) {
dev_err(mlxsw_sx->bus_info->dev, "Port %d: Failed to init core port\n",
local_port);