Re: [PATCH] virtio-pmem: reset device before delete vqs on device removal

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

 



On Fri, Sep 20, 2024 at 05:06:49PM +0800, Eryu Guan wrote:
> We should not update virtqueue status while device is in DRIVER_OK
> status, so reset device first then delete vqs.
> 
> Fixes: 6e84200c0a29 ("virtio-pmem: Add virtio pmem driver")
> Signed-off-by: Eryu Guan <eguan@xxxxxxxxxxxxxxxxx>

Hi, any comments on this patch? It also followed what other virtio
devices do.

Thanks,
Eryu

> ---
>  drivers/nvdimm/virtio_pmem.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/nvdimm/virtio_pmem.c b/drivers/nvdimm/virtio_pmem.c
> index c9b97aeabf85..55ffb0e6976b 100644
> --- a/drivers/nvdimm/virtio_pmem.c
> +++ b/drivers/nvdimm/virtio_pmem.c
> @@ -139,8 +139,8 @@ static void virtio_pmem_remove(struct virtio_device *vdev)
>  	struct nvdimm_bus *nvdimm_bus = dev_get_drvdata(&vdev->dev);
>  
>  	nvdimm_bus_unregister(nvdimm_bus);
> -	vdev->config->del_vqs(vdev);
>  	virtio_reset_device(vdev);
> +	vdev->config->del_vqs(vdev);
>  }
>  
>  static unsigned int features[] = {
> -- 
> 2.26.1.107.gefe3874




[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux