Skip to content

Commit

Permalink
mlxsw: core: Enable devlink reload only on probe
Browse files Browse the repository at this point in the history
Call devlink enable only during probe time and avoid deadlock
during reload.

Reported-by: Shalom Toledo <shalomt@mellanox.com>
Fixes: 5a508a2 ("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>
  • Loading branch information
jpirko authored and davem330 committed Nov 12, 2019
1 parent d279505 commit 73a533e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/net/ethernet/mellanox/mlxsw/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1186,10 +1186,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;

Expand Down

0 comments on commit 73a533e

Please sign in to comment.