diff options
author | Jiri Pirko <jiri@mellanox.com> | 2019-03-24 11:14:31 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-03-24 14:55:31 -0400 |
commit | e519418f8992b0165728a3c2272000ff57c8c9c3 (patch) | |
tree | 52832e75e5a3a531bb676c7e64117f1bd8e5d920 /drivers/net/ethernet/mellanox/mlxsw/switchx2.c | |
parent | 773b1f38e34e1493fefeed714386d7f973d4b31d (diff) | |
download | linux-stable-e519418f8992b0165728a3c2272000ff57c8c9c3.tar.gz linux-stable-e519418f8992b0165728a3c2272000ff57c8c9c3.tar.bz2 linux-stable-e519418f8992b0165728a3c2272000ff57c8c9c3.zip |
mlxsw: Move devlink_port_attrs_set() call before register
Since attrs are static during the existence of devlink port, set the
before registration of the port.
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.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/switchx2.c b/drivers/net/ethernet/mellanox/mlxsw/switchx2.c index 533fe6235b7c..568883fc40df 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/switchx2.c +++ b/drivers/net/ethernet/mellanox/mlxsw/switchx2.c @@ -1102,7 +1102,7 @@ static int __mlxsw_sx_port_eth_create(struct mlxsw_sx *mlxsw_sx, u8 local_port, } mlxsw_core_port_eth_set(mlxsw_sx->core, mlxsw_sx_port->local_port, - mlxsw_sx_port, dev, module + 1, false, 0); + mlxsw_sx_port, dev); mlxsw_sx->ports[local_port] = mlxsw_sx_port; return 0; @@ -1127,7 +1127,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); + err = mlxsw_core_port_init(mlxsw_sx->core, local_port, + module + 1, false, 0); if (err) { dev_err(mlxsw_sx->bus_info->dev, "Port %d: Failed to init core port\n", local_port); |