diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-24 19:11:49 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-24 19:11:49 -0700 |
commit | 832fe9c222c7d431c2bff5765a0ac61bcb3df8c8 (patch) | |
tree | ce4a482723db61955c47a028b14e3227d290d3be /drivers/virtio/virtio_pci.c | |
parent | ed9559d38a87a44e3bda87d73a50aab92471d7dc (diff) | |
parent | e34f87256794b87e7f4a8f1812538be7b7b5214c (diff) | |
download | op-kernel-dev-832fe9c222c7d431c2bff5765a0ac61bcb3df8c8.zip op-kernel-dev-832fe9c222c7d431c2bff5765a0ac61bcb3df8c8.tar.gz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus
* git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus:
virtio: Add transport feature handling stub for virtio_ring.
virtio: Rename set_features to finalize_features
virtio: Formally reserve bits 28-31 to be 'transport' features.
s390: use virtio_console for KVM on s390
virtio: console as a config option
virtio_console: use virtqueue notification for hvc_console
hvc_console: rework setup to replace irq functions with callbacks
virtio_blk: check for hardsector size from host
virtio: Use bus_type probe and remove methods
virtio: don't always force a notification when ring is full
virtio: clarify that ABI is usable by any implementations
virtio: Recycle unused recv buffer pages for large skbs in net driver
virtio net: Allow receiving SG packets
virtio net: Add ethtool ops for SG/GSO
virtio: fix virtio_net xmit of freed skb bug
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 eae72363..c7dc37c 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) return ioread32(vp_dev->ioaddr + VIRTIO_PCI_HOST_FEATURES); } -/* virtio config->set_features() implementation */ -static void vp_set_features(struct virtio_device *vdev, u32 features) +/* virtio config->finalize_features() implementation */ +static void vp_finalize_features(struct virtio_device *vdev) { struct virtio_pci_device *vp_dev = to_vp_device(vdev); - iowrite32(features, vp_dev->ioaddr + VIRTIO_PCI_GUEST_FEATURES); + /* Give virtio_ring a chance to accept features. */ + vring_transport_features(vdev); + + /* We only support 32 feature bits. */ + BUILD_BUG_ON(ARRAY_SIZE(vdev->features) != 1); + iowrite32(vdev->features[0], vp_dev->ioaddr+VIRTIO_PCI_GUEST_FEATURES); } /* virtio config->get() implementation */ @@ -297,7 +302,7 @@ static struct virtio_config_ops virtio_pci_config_ops = { .find_vq = vp_find_vq, .del_vq = vp_del_vq, .get_features = vp_get_features, - .set_features = vp_set_features, + .finalize_features = vp_finalize_features, }; /* the PCI probing function */ |