Skip to content

Commit 759be89

Browse files
elic307imstsirkin
authored andcommitted
vdpa/mlx5: Avoid executing set_vq_ready() if device is reset
Avoid executing set_vq_ready() if the device has been reset. In such case, the features are cleared and cannot be used in conditional statements. Such reference happens is the function ctrl_vq_idx(). Fixes: 5289373 ("vdpa/mlx5: Add multiqueue support") Signed-off-by: Eli Cohen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Michael S. Tsirkin <[email protected]> Acked-by: Jason Wang <[email protected]>
1 parent ef12e4b commit 759be89

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/vdpa/mlx5/net/mlx5_vnet.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1714,6 +1714,9 @@ static void mlx5_vdpa_set_vq_ready(struct vdpa_device *vdev, u16 idx, bool ready
17141714
struct mlx5_vdpa_net *ndev = to_mlx5_vdpa_ndev(mvdev);
17151715
struct mlx5_vdpa_virtqueue *mvq;
17161716

1717+
if (!mvdev->actual_features)
1718+
return;
1719+
17171720
if (!is_index_valid(mvdev, idx))
17181721
return;
17191722

0 commit comments

Comments
 (0)