]> err.no Git - linux-2.6/blobdiff - drivers/virtio/virtio.c
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
[linux-2.6] / drivers / virtio / virtio.c
index fc85cba6457831430b76a4f8e1059f35c8c3e325..5b78fd0aff0a6d50306c75f80d99f52f97dbe99e 100644 (file)
@@ -113,12 +113,16 @@ static int virtio_dev_probe(struct device *_d)
                        set_bit(f, dev->features);
        }
 
+       /* Transport features always preserved to pass to finalize_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);
        else {
-               /* They should never have set feature bits beyond 32 */
-               dev->config->set_features(dev, dev->features[0]);
+               dev->config->finalize_features(dev);
                add_status(dev, VIRTIO_CONFIG_S_DRIVER_OK);
        }
        return err;