summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/mellanox/mlxsw
diff options
context:
space:
mode:
authorJiri Pirko <jiri@mellanox.com>2019-11-10 18:31:44 +0300
committerDavid S. Miller <davem@davemloft.net>2019-11-12 08:38:33 +0300
commit5b67a3ed4fe3f859045cfcc5b1dbd80d058075b5 (patch)
treed7928c29304fd71fa8bb0fbd07f397c5a33d5e88 /drivers/net/ethernet/mellanox/mlxsw
parent1287723aa139b46dc0b9b53c7212af71f1acfc39 (diff)
downloadlinux-5b67a3ed4fe3f859045cfcc5b1dbd80d058075b5.tar.xz
mlxsw: core: Enable devlink reload only on probe
Call devlink enable only during probe time and avoid deadlock during reload. Reported-by: Shalom Toledo <shalomt@mellanox.com> Fixes: a0c76345e3d3 ("devlink: disallow reload operation during device cleanup") Signed-off-by: Jiri Pirko <jiri@mellanox.com> Tested-by: Shalom Toledo <shalomt@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlxsw')
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/core.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/core.c b/drivers/net/ethernet/mellanox/mlxsw/core.c
index da436a6aad2f..42e1ce3e39e1 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/core.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/core.c
@@ -1198,10 +1198,11 @@ __mlxsw_core_bus_device_register(const struct mlxsw_bus_info *mlxsw_bus_info,
if (err)
goto err_thermal_init;
- if (mlxsw_driver->params_register) {
+ if (mlxsw_driver->params_register)
devlink_params_publish(devlink);
+
+ if (!reload)
devlink_reload_enable(devlink);
- }
return 0;