OSDN Git Service

eth: mlxsw: switch to explicit locking for port registration
authorJakub Kicinski <kuba@kernel.org>
Tue, 15 Mar 2022 06:00:07 +0000 (23:00 -0700)
committerJakub Kicinski <kuba@kernel.org>
Wed, 16 Mar 2022 19:56:39 +0000 (12:56 -0700)
commit5e8930aa86a561998a37aa512d790ad2982122bc
tree4724e3d9c08a49b08eabc40ee8989f85a1407786
parent162cca42920c2597298fcdf85538b40356c92151
eth: mlxsw: switch to explicit locking for port registration

Explicitly lock the devlink instance and use devl_ API.

This will be used by the subsequent patch to invoke
.port_split / .port_unsplit callbacks with devlink
instance lock held.

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/minimal.c
drivers/net/ethernet/mellanox/mlxsw/spectrum.c