diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2017-04-04 20:44:44 +0200 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2017-04-10 23:29:59 +0200 |
commit | 0a9b3f47da5b8a2c4bf4f2f2199761f49ac0a54e (patch) | |
tree | ce81a903abb42f7d92d5e1a8929d3ced8c388d69 /drivers/virtio/virtio_pci_legacy.c | |
parent | Revert "virtio_pci: use shared interrupts for virtqueues" (diff) | |
download | linux-0a9b3f47da5b8a2c4bf4f2f2199761f49ac0a54e.tar.xz linux-0a9b3f47da5b8a2c4bf4f2f2199761f49ac0a54e.zip |
Revert "virtio_pci: remove struct virtio_pci_vq_info"
This reverts commit 5c34d002dcc7a6dd665a19d098b4f4cd5501ba1a.
Conflicts:
drivers/virtio/virtio_pci_common.c
The cleanup seems to be one of the changes that broke
hybernation for some users. We are still not sure why
but revert helps.
This reverts the cleanup changes but keeps the affinity support.
Tested-by: Mike Galbraith <efault@gmx.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/virtio/virtio_pci_legacy.c')
-rw-r--r-- | drivers/virtio/virtio_pci_legacy.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/virtio/virtio_pci_legacy.c b/drivers/virtio/virtio_pci_legacy.c index 5dd01f09608b..4bfa48fb1324 100644 --- a/drivers/virtio/virtio_pci_legacy.c +++ b/drivers/virtio/virtio_pci_legacy.c @@ -112,6 +112,7 @@ static u16 vp_config_vector(struct virtio_pci_device *vp_dev, u16 vector) } static struct virtqueue *setup_vq(struct virtio_pci_device *vp_dev, + struct virtio_pci_vq_info *info, unsigned index, void (*callback)(struct virtqueue *vq), const char *name, @@ -129,6 +130,8 @@ static struct virtqueue *setup_vq(struct virtio_pci_device *vp_dev, if (!num || ioread32(vp_dev->ioaddr + VIRTIO_PCI_QUEUE_PFN)) return ERR_PTR(-ENOENT); + info->msix_vector = msix_vec; + /* create the vring */ vq = vring_create_virtqueue(index, num, VIRTIO_PCI_VRING_ALIGN, &vp_dev->vdev, @@ -159,8 +162,9 @@ out_deactivate: return ERR_PTR(err); } -static void del_vq(struct virtqueue *vq) +static void del_vq(struct virtio_pci_vq_info *info) { + struct virtqueue *vq = info->vq; struct virtio_pci_device *vp_dev = to_vp_device(vq->vdev); iowrite16(vq->index, vp_dev->ioaddr + VIRTIO_PCI_QUEUE_SEL); |