Commit 73a533ec authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller

mlxsw: core: Enable devlink reload only on probe

Call devlink enable only during probe time and avoid deadlock
during reload.
Reported-by: default avatarShalom Toledo <shalomt@mellanox.com>
Fixes: 5a508a25 ("devlink: disallow reload operation during device cleanup")
Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
Tested-by: default avatarShalom Toledo <shalomt@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d279505b
...@@ -1186,10 +1186,11 @@ __mlxsw_core_bus_device_register(const struct mlxsw_bus_info *mlxsw_bus_info, ...@@ -1186,10 +1186,11 @@ __mlxsw_core_bus_device_register(const struct mlxsw_bus_info *mlxsw_bus_info,
if (err) if (err)
goto err_thermal_init; goto err_thermal_init;
if (mlxsw_driver->params_register) { if (mlxsw_driver->params_register)
devlink_params_publish(devlink); devlink_params_publish(devlink);
if (!reload)
devlink_reload_enable(devlink); devlink_reload_enable(devlink);
}
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment