summaryrefslogtreecommitdiffstats
path: root/drivers/virtio
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2008-07-25 12:06:07 -0500
committerRusty Russell <rusty@rustcorp.com.au>2008-07-25 12:06:07 +1000
commitdd7c7bc46211785a1aa7d70feb15830f62682b3c (patch)
tree3c615eac390c11339c652947e744d12cb82b4d36 /drivers/virtio
parentfaeba830b086bc9e58748869054e994cb09693cd (diff)
downloadlinux-dd7c7bc46211785a1aa7d70feb15830f62682b3c.tar.gz
linux-dd7c7bc46211785a1aa7d70feb15830f62682b3c.tar.bz2
linux-dd7c7bc46211785a1aa7d70feb15830f62682b3c.zip
virtio: Formally reserve bits 28-31 to be 'transport' features.
We assign feature bits as required, but it makes sense to reserve some for the particular transport, rather than the particular device. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/virtio')
-rw-r--r--drivers/virtio/virtio.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c
index fc85cba64578..baf103361e3a 100644
--- a/drivers/virtio/virtio.c
+++ b/drivers/virtio/virtio.c
@@ -113,6 +113,11 @@ static int virtio_dev_probe(struct device *_d)
set_bit(f, dev->features);
}
+ /* Transport features are always preserved to pass to set_features. */
+ for (i = VIRTIO_TRANSPORT_F_START; i < VIRTIO_TRANSPORT_F_END; i++)
+ if (device_features & (1 << i))
+ set_bit(i, dev->features);
+
err = drv->probe(dev);
if (err)
add_status(dev, VIRTIO_CONFIG_S_FAILED);