[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191119050951.850109484@linuxfoundation.org>
Date: Tue, 19 Nov 2019 06:19:25 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Shalom Toledo <shalomt@...lanox.com>,
Jiri Pirko <jiri@...lanox.com>,
"David S. Miller" <davem@...emloft.net>
Subject: [PATCH 5.3 05/48] mlxsw: core: Enable devlink reload only on probe
From: Jiri Pirko <jiri@...lanox.com>
[ Upstream commit 73a533ecf0af5f73ff72dd7c96d1c8598ca93649 ]
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>
Tested-by: Shalom Toledo <shalomt@...lanox.com>
Signed-off-by: David S. Miller <davem@...emloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/net/ethernet/mellanox/mlxsw/core.c | 5 +++--
net/core/devlink.c | 2 +-
2 files changed, 4 insertions(+), 3 deletions(-)
--- a/drivers/net/ethernet/mellanox/mlxsw/core.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/core.c
@@ -1128,10 +1128,11 @@ __mlxsw_core_bus_device_register(const s
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;
--- a/net/core/devlink.c
+++ b/net/core/devlink.c
@@ -5559,7 +5559,7 @@ EXPORT_SYMBOL_GPL(devlink_register);
void devlink_unregister(struct devlink *devlink)
{
mutex_lock(&devlink_mutex);
- WARN_ON(devlink_reload_supported(devlink) &&
+ WARN_ON(devlink->ops->reload &&
devlink->reload_enabled);
devlink_notify(devlink, DEVLINK_CMD_DEL);
list_del(&devlink->list);
Powered by blists - more mailing lists