aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/virtio/virtio_pci.c
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2008-07-25 13:06:13 -0400
committerRusty Russell <rusty@rustcorp.com.au>2008-07-24 22:06:14 -0400
commite34f87256794b87e7f4a8f1812538be7b7b5214c (patch)
treeb91ffb6df4ac13ace269bef60ae16a1048b1fa73 /drivers/virtio/virtio_pci.c
parentc624896e488ba2bff5ae497782cfb265c8b00646 (diff)
virtio: Add transport feature handling stub for virtio_ring.
To prepare for virtio_ring transport feature bits, hook in a call in all the users to manipulate them. This currently just clears all the bits, since it doesn't understand any features. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/virtio/virtio_pci.c')
-rw-r--r--drivers/virtio/virtio_pci.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
index 9855975a72a3..c7dc37c7cce9 100644
--- a/drivers/virtio/virtio_pci.c
+++ b/drivers/virtio/virtio_pci.c
@@ -99,6 +99,9 @@ static void vp_finalize_features(struct virtio_device *vdev)
99{ 99{
100 struct virtio_pci_device *vp_dev = to_vp_device(vdev); 100 struct virtio_pci_device *vp_dev = to_vp_device(vdev);
101 101
102 /* Give virtio_ring a chance to accept features. */
103 vring_transport_features(vdev);
104
102 /* We only support 32 feature bits. */ 105 /* We only support 32 feature bits. */
103 BUILD_BUG_ON(ARRAY_SIZE(vdev->features) != 1); 106 BUILD_BUG_ON(ARRAY_SIZE(vdev->features) != 1);
104 iowrite32(vdev->features[0], vp_dev->ioaddr+VIRTIO_PCI_GUEST_FEATURES); 107 iowrite32(vdev->features[0], vp_dev->ioaddr+VIRTIO_PCI_GUEST_FEATURES);