Patch "vdpa/mlx5: Setup driver only if VIRTIO_CONFIG_S_DRIVER_OK" has been added to the 5.9-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    vdpa/mlx5: Setup driver only if VIRTIO_CONFIG_S_DRIVER_OK

to the 5.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     vdpa-mlx5-setup-driver-only-if-virtio_config_s_drive.patch
and it can be found in the queue-5.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 21f632936dce16ad9210e81dc80c49df22f8ea7c
Author: Eli Cohen <elic@xxxxxxxxxx>
Date:   Tue Sep 8 15:33:46 2020 +0300

    vdpa/mlx5: Setup driver only if VIRTIO_CONFIG_S_DRIVER_OK
    
    [ Upstream commit 1897f0b618b0af0eb9dca709ab6bdf9ef1969ef7 ]
    
    set_map() is used by mlx5 vdpa to create a memory region based on the
    address map passed by the iotlb argument. If we get successive calls, we
    will destroy the current memory region and build another one based on
    the new address mapping. We also need to setup the hardware resources
    since they depend on the memory region.
    
    If these calls happen before DRIVER_OK, It means that driver VQs may
    also not been setup and we may not create them yet. In this case we want
    to avoid setting up the other resources and defer this till we get
    DRIVER OK.
    
    Fixes: 1a86b377aa21 ("vdpa/mlx5: Add VDPA driver for supported mlx5 devices")
    Signed-off-by: Eli Cohen <elic@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20200908123346.GA169007@xxxxxxxxxxxxxxxxxxxxxxxxx
    Signed-off-by: Michael S. Tsirkin <mst@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c
index 5ca309473c03d..1fa6fcac82992 100644
--- a/drivers/vdpa/mlx5/net/mlx5_vnet.c
+++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c
@@ -1658,6 +1658,9 @@ static int mlx5_vdpa_change_map(struct mlx5_vdpa_net *ndev, struct vhost_iotlb *
 	if (err)
 		goto err_mr;
 
+	if (!(ndev->mvdev.status & VIRTIO_CONFIG_S_DRIVER_OK))
+		return 0;
+
 	restore_channels_info(ndev);
 	err = setup_driver(ndev);
 	if (err)



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux