diff options
author | Mark McLoughlin <markmc@redhat.com> | 2008-06-15 09:20:50 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-06-15 16:46:16 -0400 |
commit | b92dea67cc66970cda6b5b11895d08e35b4618e7 (patch) | |
tree | 556e842834c7316f57f3f27fea6b8622d74fde8e /drivers/virtio/virtio.c | |
parent | 0269c5c6d9a9de22715ecda589730547435cd3e8 (diff) |
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/virtio.c')
-rw-r--r-- | drivers/virtio/virtio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c index 0f3c2bb7bf35..7084e7e146c0 100644 --- a/drivers/virtio/virtio.c +++ b/drivers/virtio/virtio.c | |||
@@ -124,9 +124,9 @@ static int virtio_dev_probe(struct device *_d) | |||
124 | if (err) | 124 | if (err) |
125 | add_status(dev, VIRTIO_CONFIG_S_FAILED); | 125 | add_status(dev, VIRTIO_CONFIG_S_FAILED); |
126 | else { | 126 | else { |
127 | add_status(dev, VIRTIO_CONFIG_S_DRIVER_OK); | ||
128 | /* They should never have set feature bits beyond 32 */ | 127 | /* They should never have set feature bits beyond 32 */ |
129 | dev->config->set_features(dev, dev->features[0]); | 128 | dev->config->set_features(dev, dev->features[0]); |
129 | add_status(dev, VIRTIO_CONFIG_S_DRIVER_OK); | ||
130 | } | 130 | } |
131 | return err; | 131 | return err; |
132 | } | 132 | } |