aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/virtio/virtio_pci.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
index 6a7b8bff51e5..7b82eb5c0c5a 100644
--- a/drivers/virtio/virtio_pci.c
+++ b/drivers/virtio/virtio_pci.c
@@ -204,11 +204,9 @@ static void vp_reset(struct virtio_device *vdev)
204/* the notify function used when creating a virt queue */ 204/* the notify function used when creating a virt queue */
205static bool vp_notify(struct virtqueue *vq) 205static bool vp_notify(struct virtqueue *vq)
206{ 206{
207 struct virtio_pci_device *vp_dev = to_vp_device(vq->vdev);
208
209 /* we write the queue's selector into the notification register to 207 /* we write the queue's selector into the notification register to
210 * signal the other end */ 208 * signal the other end */
211 iowrite16(vq->index, vp_dev->ioaddr + VIRTIO_PCI_QUEUE_NOTIFY); 209 iowrite16(vq->index, (void __iomem *)vq->priv);
212 return true; 210 return true;
213} 211}
214 212
@@ -437,6 +435,7 @@ static struct virtqueue *setup_vq(struct virtio_device *vdev, unsigned index,
437 goto out_activate_queue; 435 goto out_activate_queue;
438 } 436 }
439 437
438 vq->priv = (void __force *)vp_dev->ioaddr + VIRTIO_PCI_QUEUE_NOTIFY;
440 info->vq = vq; 439 info->vq = vq;
441 440
442 if (msix_vec != VIRTIO_MSI_NO_VECTOR) { 441 if (msix_vec != VIRTIO_MSI_NO_VECTOR) {