Skip to contentSkip to conversation

mlxsw: core: Enable devlink reload only on probe

PATCH Applied Jiri Pirko 3 participants 3 messages Nov 10, 2019 – Nov 12, 2019

Subsystems (3)
lore
Share & tools
lore

Jiri Pirko

author
#0 lore raw

PATCH 1/1 mlxsw: core: Enable devlink reload only on probe

From: Jiri Pirko <[email protected]>

Call devlink enable only during probe time and avoid deadlock during reload.

Fixes 5a508a254bed ("devlink: disallow reload operation during device cleanup")
---
 drivers/net/ethernet/mellanox/mlxsw/core.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/net/ethernet/mellanox/mlxsw/core.c +3 -2
index 20e9dc46cacd..0a0884d86d44 100644
@@ -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;
 
Signature · 1 line
2.21.0
Applied
#2 lore raw
In reply to Jiri Pirko

From: Jiri Pirko <[email protected]>
Date: Sun, 10 Nov 2019 16:31:23 +0100

Quoted 8 lines

From: Jiri Pirko <[email protected]>

Call devlink enable only during probe time and avoid deadlock during reload.

Fixes 5a508a254bed ("devlink: disallow reload operation during device cleanup")

Applied, and since the Fixes: tag commit is queued up for -stable, I'll queue up this one too.

Thanks.