summaryrefslogtreecommitdiffstats
path: root/drivers/virtio
diff options
context:
space:
mode:
authorMark McLoughlin <markmc@redhat.com>2008-06-15 23:20:50 +1000
committerLinus Torvalds <torvalds@linux-foundation.org>2008-06-15 13:46:16 -0700
commitb92dea67cc66970cda6b5b11895d08e35b4618e7 (patch)
tree556e842834c7316f57f3f27fea6b8622d74fde8e /drivers/virtio
parent0269c5c6d9a9de22715ecda589730547435cd3e8 (diff)
downloadop-kernel-dev-b92dea67cc66970cda6b5b11895d08e35b4618e7.zip
op-kernel-dev-b92dea67cc66970cda6b5b11895d08e35b4618e7.tar.gz
virtio: Complete feature negotation before updating status
lguest (in rusty's use-tun-ringfd patch) assumes that the guest has updated its feature bits before setting its status to VIRTIO_CONFIG_S_DRIVER_OK. That's pretty reasonable, so let's make it so. Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/virtio')
-rw-r--r--drivers/virtio/virtio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c
index 0f3c2bb..7084e7e 100644
--- a/drivers/virtio/virtio.c
+++ b/drivers/virtio/virtio.c
@@ -124,9 +124,9 @@ static int virtio_dev_probe(struct device *_d)
if (err)
add_status(dev, VIRTIO_CONFIG_S_FAILED);
else {
- add_status(dev, VIRTIO_CONFIG_S_DRIVER_OK);
/* They should never have set feature bits beyond 32 */
dev->config->set_features(dev, dev->features[0]);
+ add_status(dev, VIRTIO_CONFIG_S_DRIVER_OK);
}
return err;
}
OpenPOWER on IntegriCloud