diff options
Diffstat (limited to 'drivers/virtio')
-rw-r--r-- | drivers/virtio/virtio_pci.c | 4 | ||||
-rw-r--r-- | drivers/virtio/virtio_ring.c | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index f28643f3a4e8..7462a51e820b 100644 --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c | |||
@@ -249,8 +249,8 @@ static struct virtqueue *vp_find_vq(struct virtio_device *vdev, unsigned index, | |||
249 | vp_dev->ioaddr + VIRTIO_PCI_QUEUE_PFN); | 249 | vp_dev->ioaddr + VIRTIO_PCI_QUEUE_PFN); |
250 | 250 | ||
251 | /* create the vring */ | 251 | /* create the vring */ |
252 | vq = vring_new_virtqueue(info->num, vdev, info->queue, | 252 | vq = vring_new_virtqueue(info->num, VIRTIO_PCI_VRING_ALIGN, |
253 | vp_notify, callback); | 253 | vdev, info->queue, vp_notify, callback); |
254 | if (!vq) { | 254 | if (!vq) { |
255 | err = -ENOMEM; | 255 | err = -ENOMEM; |
256 | goto out_activate_queue; | 256 | goto out_activate_queue; |
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index 6eb5303fed11..5777196bf6c9 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c | |||
@@ -274,6 +274,7 @@ static struct virtqueue_ops vring_vq_ops = { | |||
274 | }; | 274 | }; |
275 | 275 | ||
276 | struct virtqueue *vring_new_virtqueue(unsigned int num, | 276 | struct virtqueue *vring_new_virtqueue(unsigned int num, |
277 | unsigned int vring_align, | ||
277 | struct virtio_device *vdev, | 278 | struct virtio_device *vdev, |
278 | void *pages, | 279 | void *pages, |
279 | void (*notify)(struct virtqueue *), | 280 | void (*notify)(struct virtqueue *), |
@@ -292,7 +293,7 @@ struct virtqueue *vring_new_virtqueue(unsigned int num, | |||
292 | if (!vq) | 293 | if (!vq) |
293 | return NULL; | 294 | return NULL; |
294 | 295 | ||
295 | vring_init(&vq->vring, num, pages, PAGE_SIZE); | 296 | vring_init(&vq->vring, num, pages, vring_align); |
296 | vq->vq.callback = callback; | 297 | vq->vq.callback = callback; |
297 | vq->vq.vdev = vdev; | 298 | vq->vq.vdev = vdev; |
298 | vq->vq.vq_ops = &vring_vq_ops; | 299 | vq->vq.vq_ops = &vring_vq_ops; |