diff options
author | Leon Romanovsky <leonro@nvidia.com> | 2021-10-12 16:15:26 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-10-13 02:29:17 +0300 |
commit | 82465bec3e9713c395b0a02f5aaf7949443cb877 (patch) | |
tree | 018030f09d90a9c953d8c354aeb11f9f6ef7f4b1 /drivers/net/ethernet/mellanox/mlx5/core/sf/dev/driver.c | |
parent | 96869f193cfd26c2b47db32e4d8bcad50461df7a (diff) | |
download | linux-82465bec3e9713c395b0a02f5aaf7949443cb877.tar.xz |
devlink: Delete reload enable/disable interface
Commit a0c76345e3d3 ("devlink: disallow reload operation during device
cleanup") added devlink_reload_{enable,disable}() APIs to prevent reload
operation from racing with device probe/dismantle.
After recent changes to move devlink_register() to the end of device
probe and devlink_unregister() to the beginning of device dismantle,
these races can no longer happen. Reload operations will be denied if
the devlink instance is unregistered and devlink_unregister() will block
until all in-flight operations are done.
Therefore, remove these devlink_reload_{enable,disable}() APIs.
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/sf/dev/driver.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/sf/dev/driver.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/sf/dev/driver.c b/drivers/net/ethernet/mellanox/mlx5/core/sf/dev/driver.c index 3cf272fa2164..7b4783ce213e 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/sf/dev/driver.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/sf/dev/driver.c @@ -47,7 +47,6 @@ static int mlx5_sf_dev_probe(struct auxiliary_device *adev, const struct auxilia goto init_one_err; } devlink_register(devlink); - devlink_reload_enable(devlink); return 0; init_one_err: @@ -62,10 +61,8 @@ mdev_err: static void mlx5_sf_dev_remove(struct auxiliary_device *adev) { struct mlx5_sf_dev *sf_dev = container_of(adev, struct mlx5_sf_dev, adev); - struct devlink *devlink; + struct devlink *devlink = priv_to_devlink(sf_dev->mdev); - devlink = priv_to_devlink(sf_dev->mdev); - devlink_reload_disable(devlink); devlink_unregister(devlink); mlx5_uninit_one(sf_dev->mdev); iounmap(sf_dev->mdev->iseg); |