[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191110153144.15941-1-jiri@resnulli.us>
Date: Sun, 10 Nov 2019 16:31:44 +0100
From: Jiri Pirko <jiri@...nulli.us>
To: netdev@...r.kernel.org
Cc: davem@...emloft.net, jakub.kicinski@...ronome.com,
idosch@...lanox.com, shalomt@...lanox.com, mlxsw@...lanox.com
Subject: [patch net-next] mlxsw: core: Enable devlink reload only on probe
From: Jiri Pirko <jiri@...lanox.com>
Call devlink enable only during probe time and avoid deadlock
during reload.
Reported-by: Shalom Toledo <shalomt@...lanox.com>
Fixes: a0c76345e3d3 ("devlink: disallow reload operation during device cleanup")
Signed-off-by: Jiri Pirko <jiri@...lanox.com>
---
drivers/net/ethernet/mellanox/mlxsw/core.c | 5 +++--
1 file 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;
--
2.21.0
Powered by blists - more mailing lists