diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-07-27 11:25:57 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-07-27 11:25:57 -0400 |
commit | 50cb993ea6cd187bfed085cb3e0747066edeb02f (patch) | |
tree | 61edac62c6c5bc07c59e4369c50c6821ad77f2c0 /drivers/virtio/virtio_pci.c | |
parent | 445c2714cf72817ab1ad3ca894c6d9b2047b3a3e (diff) | |
parent | 8be1a6d6c77ab4532e4476fdb8177030ef48b52c (diff) |
Merge ../linux-2.6
Diffstat (limited to 'drivers/virtio/virtio_pci.c')
-rw-r--r-- | drivers/virtio/virtio_pci.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index eae7236310e4..c7dc37c7cce9 100644 --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c | |||
@@ -94,12 +94,17 @@ static u32 vp_get_features(struct virtio_device *vdev) | |||
94 | return ioread32(vp_dev->ioaddr + VIRTIO_PCI_HOST_FEATURES); | 94 | return ioread32(vp_dev->ioaddr + VIRTIO_PCI_HOST_FEATURES); |
95 | } | 95 | } |
96 | 96 | ||
97 | /* virtio config->set_features() implementation */ | 97 | /* virtio config->finalize_features() implementation */ |
98 | static void vp_set_features(struct virtio_device *vdev, u32 features) | 98 | 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 | iowrite32(features, vp_dev->ioaddr + VIRTIO_PCI_GUEST_FEATURES); | 102 | /* Give virtio_ring a chance to accept features. */ |
103 | vring_transport_features(vdev); | ||
104 | |||
105 | /* We only support 32 feature bits. */ | ||
106 | BUILD_BUG_ON(ARRAY_SIZE(vdev->features) != 1); | ||
107 | iowrite32(vdev->features[0], vp_dev->ioaddr+VIRTIO_PCI_GUEST_FEATURES); | ||
103 | } | 108 | } |
104 | 109 | ||
105 | /* virtio config->get() implementation */ | 110 | /* virtio config->get() implementation */ |
@@ -297,7 +302,7 @@ static struct virtio_config_ops virtio_pci_config_ops = { | |||
297 | .find_vq = vp_find_vq, | 302 | .find_vq = vp_find_vq, |
298 | .del_vq = vp_del_vq, | 303 | .del_vq = vp_del_vq, |
299 | .get_features = vp_get_features, | 304 | .get_features = vp_get_features, |
300 | .set_features = vp_set_features, | 305 | .finalize_features = vp_finalize_features, |
301 | }; | 306 | }; |
302 | 307 | ||
303 | /* the PCI probing function */ | 308 | /* the PCI probing function */ |