diff options
author | Dragos Tatulea <dtatulea@nvidia.com> | 2024-06-26 13:26:42 +0300 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2024-07-09 15:42:44 +0300 |
commit | a366465b4828b55e12f3a4cc0738bd5755d7077d (patch) | |
tree | 93eb62cb7c3a51d900d4e45cd8cebfa4b7bceba3 /drivers/vdpa/mlx5/net/mlx5_vnet.c | |
parent | 34bd86c7202222ee588a33aee993fa29cd181e83 (diff) | |
download | linux-a366465b4828b55e12f3a4cc0738bd5755d7077d.tar.xz |
vdpa/mlx5: Remove duplicate suspend code
Use the dedicated suspend_vqs() function instead.
Reviewed-by: Cosmin Ratiu <cratiu@nvidia.com>
Reviewed-by: Eugenio PĂ©rez <eperezma@redhat.com>
Signed-off-by: Dragos Tatulea <dtatulea@nvidia.com>
Message-Id: <20240626-stage-vdpa-vq-precreate-v2-6-560c491078df@nvidia.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/vdpa/mlx5/net/mlx5_vnet.c')
-rw-r--r-- | drivers/vdpa/mlx5/net/mlx5_vnet.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c index 51630b1935f4..eca6f68c2eda 100644 --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c @@ -3355,17 +3355,12 @@ static int mlx5_vdpa_suspend(struct vdpa_device *vdev) { struct mlx5_vdpa_dev *mvdev = to_mvdev(vdev); struct mlx5_vdpa_net *ndev = to_mlx5_vdpa_ndev(mvdev); - struct mlx5_vdpa_virtqueue *mvq; - int i; mlx5_vdpa_info(mvdev, "suspending device\n"); down_write(&ndev->reslock); unregister_link_notifier(ndev); - for (i = 0; i < ndev->cur_num_vqs; i++) { - mvq = &ndev->vqs[i]; - suspend_vq(ndev, mvq); - } + suspend_vqs(ndev); mlx5_vdpa_cvq_suspend(mvdev); mvdev->suspended = true; up_write(&ndev->reslock); |