diff options
author | Jakub Kicinski <kuba@kernel.org> | 2022-03-15 09:00:06 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-03-16 22:56:37 +0300 |
commit | 162cca42920c2597298fcdf85538b40356c92151 (patch) | |
tree | 4b6de41a2b850fa7e27da1d3675cb7cedadda312 /drivers/net/ethernet/netronome/nfp/nfp_port.c | |
parent | 8a38f2cc968aebe40cfa287b53b1b52ef7acd4dc (diff) | |
download | linux-162cca42920c2597298fcdf85538b40356c92151.tar.xz |
eth: nfp: replace driver's "pf" lock with devlink instance lock
The whole reason for existence of the pf mutex is that we could
not lock the devlink instance around port splitting. There are
more types of reconfig which can make ports appear or disappear.
Now that the devlink instance lock is exposed to drivers and
"locked" helpers exist we can switch to using the devlink lock
directly.
Next patches will move the locking inside .port_(un)split to
the core.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/netronome/nfp/nfp_port.c')
-rw-r--r-- | drivers/net/ethernet/netronome/nfp/nfp_port.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_port.c b/drivers/net/ethernet/netronome/nfp/nfp_port.c index 93c5bfc0510b..236cd3c1201f 100644 --- a/drivers/net/ethernet/netronome/nfp/nfp_port.c +++ b/drivers/net/ethernet/netronome/nfp/nfp_port.c @@ -78,9 +78,10 @@ int nfp_port_set_features(struct net_device *netdev, netdev_features_t features) struct nfp_port * nfp_port_from_id(struct nfp_pf *pf, enum nfp_port_type type, unsigned int id) { + struct devlink *devlink = priv_to_devlink(pf); struct nfp_port *port; - lockdep_assert_held(&pf->lock); + devl_assert_locked(devlink); if (type != NFP_PORT_PHYS_PORT) return NULL; |