aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorKrishna Kumar <krkumar2@in.ibm.com>2011-10-05 01:38:59 -0400
committerRusty Russell <rusty@rustcorp.com.au>2011-11-01 21:11:01 -0400
commit005b20a8e0f587a46a00910ba4507bb9f6da70ea (patch)
treeb15122f5bcbb4f574286c9fea3251339caa5b5e2 /drivers
parent5e38483b350405542c8080134408fd8897394ba2 (diff)
virtio: Dont add "config" to list for !per_vq_vector
For the MSI but non-per_vq_vector case, the config/change vq also gets added to the list of vqs that need to process the MSI interrupt. This is not needed as config has it's own handler (vp_config_changed). In any case, vring_interrupt() finds nothing needs to be done on this vq. I tested this patch by testing the "Fallback:" and "Finally fall back" cases in vp_find_vqs(). Please review. Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/virtio/virtio_pci.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
index 4bcc8b82640b..79a31e5b4b68 100644
--- a/drivers/virtio/virtio_pci.c
+++ b/drivers/virtio/virtio_pci.c
@@ -415,9 +415,13 @@ static struct virtqueue *setup_vq(struct virtio_device *vdev, unsigned index,
415 } 415 }
416 } 416 }
417 417
418 spin_lock_irqsave(&vp_dev->lock, flags); 418 if (callback) {
419 list_add(&info->node, &vp_dev->virtqueues); 419 spin_lock_irqsave(&vp_dev->lock, flags);
420 spin_unlock_irqrestore(&vp_dev->lock, flags); 420 list_add(&info->node, &vp_dev->virtqueues);
421 spin_unlock_irqrestore(&vp_dev->lock, flags);
422 } else {
423 INIT_LIST_HEAD(&info->node);
424 }
421 425
422 return vq; 426 return vq;
423 427