Commit 5b67a3ed 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: a0c76345 ("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 1287723a
...@@ -1198,10 +1198,11 @@ __mlxsw_core_bus_device_register(const struct mlxsw_bus_info *mlxsw_bus_info, ...@@ -1198,10 +1198,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