]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
virtio: set pci bus master enable bit
authorMichael S. Tsirkin <mst@redhat.com>
Sun, 29 Nov 2009 15:52:00 +0000 (17:52 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 21 Mar 2011 19:45:25 +0000 (12:45 -0700)
commit bc505f373979692d51a86d40925f77a8b09d17b9 upstream.

As all virtio devices perform DMA, we
must enable bus mastering for them to be
spec compliant.

This patch fixes hotplug of virtio devices
with Linux guests and qemu 0.11-0.12.

Tested-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Cc: maximilian attems <max@stro.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/virtio/virtio_pci.c

index da5fc74e26165d9ce459933de892aab805a6c43c..77a0d5eb7fd0b6760e39d73599c574f86190e778 100644 (file)
@@ -644,6 +644,7 @@ static int __devinit virtio_pci_probe(struct pci_dev *pci_dev,
                goto out_req_regions;
 
        pci_set_drvdata(pci_dev, vp_dev);
+       pci_set_master(pci_dev);
 
        /* we use the subsystem vendor/device id as the virtio vendor/device
         * id.  this allows us to use the same PCI vendor/device id for all