mlxsw: convert driver to use unlocked devlink API during init/fini
authorJiri Pirko <jiri@nvidia.com>
Sat, 16 Jul 2022 11:02:38 +0000 (13:02 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 19 Jul 2022 03:10:47 +0000 (20:10 -0700)
commit72a4c8c94efa5ce2b46c3f921b8830d7704121fc
tree995cebfa416308b88b4b0815ed778836ada9dce9
parent70a2ff89369d17c55efacb789171c3bd05c21817
mlxsw: convert driver to use unlocked devlink API during init/fini

Prepare for devlink reload being called with devlink->lock held and
convert the mlxsw driver to use unlocked devlink API during init and
fini flows. Take devl_lock() in reload_down() and reload_up() ops in the
meantime before reload cmd is converted to take the lock itself.

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Tested-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlxsw/core.c
drivers/net/ethernet/mellanox/mlxsw/spectrum.c
drivers/net/ethernet/mellanox/mlxsw/spectrum1_kvdl.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_cnt.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_policer.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_trap.c