[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191110153123.15885-1-jiri@resnulli.us>
Date: Sun, 10 Nov 2019 16:31:23 +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] 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: 5a508a254bed ("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 20e9dc46cacd..0a0884d86d44 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/core.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/core.c
@@ -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;
--
2.21.0
Powered by blists - more mailing lists