lkml.org 
[lkml]   [2021]   [Apr]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/7] vp_vdpa: switch to use vp_modern_map_vq_notify()
On Thu, Apr 15, 2021 at 03:31:43AM -0400, Jason Wang wrote:
> This patch switches to use vp_vdpa to use vp_modern_map_notify().
>
> Signed-off-by: Jason Wang <jasowang@redhat.com>

Reviewed-by: Eli Cohen <elic@nvidia.com>

> ---
> drivers/vdpa/virtio_pci/vp_vdpa.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/vdpa/virtio_pci/vp_vdpa.c b/drivers/vdpa/virtio_pci/vp_vdpa.c
> index 1321a2fcd088..2afc90645660 100644
> --- a/drivers/vdpa/virtio_pci/vp_vdpa.c
> +++ b/drivers/vdpa/virtio_pci/vp_vdpa.c
> @@ -369,7 +369,6 @@ static int vp_vdpa_probe(struct pci_dev *pdev, const struct pci_device_id *id)
> struct virtio_pci_modern_device *mdev;
> struct device *dev = &pdev->dev;
> struct vp_vdpa *vp_vdpa;
> - u16 notify_off;
> int ret, i;
>
> ret = pcim_enable_device(pdev);
> @@ -415,10 +414,12 @@ static int vp_vdpa_probe(struct pci_dev *pdev, const struct pci_device_id *id)
> }
>
> for (i = 0; i < vp_vdpa->queues; i++) {
> - notify_off = vp_modern_get_queue_notify_off(mdev, i);
> vp_vdpa->vring[i].irq = VIRTIO_MSI_NO_VECTOR;
> - vp_vdpa->vring[i].notify = mdev->notify_base +
> - notify_off * mdev->notify_offset_multiplier;
> + vp_vdpa->vring[i].notify = vp_modern_map_vq_notify(mdev, i);
> + if (!vp_vdpa->vring[i].notify) {
> + dev_warn(&pdev->dev, "Fail to map vq notify %d\n", i);
> + goto err;
> + }
> }
> vp_vdpa->config_irq = VIRTIO_MSI_NO_VECTOR;
>
> --
> 2.18.1
>

\
 
 \ /
  Last update: 2021-04-21 09:46    [W:0.075 / U:0.444 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site