The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Mark McLoughlin <markmc@redhat.com>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: linux-kernel@vger.kernel.org,
	virtualization@lists.linux-foundation.org,
	Mark McLoughlin <markmc@redhat.com>
Subject: [PATCH 2/2] virtio: Complete feature negotation before updating status
Date: Fri, 13 Jun 2008 13:46:41 +0100	[thread overview]
Message-ID: <1213361201-10854-2-git-send-email-markmc@redhat.com> (raw)
In-Reply-To: <1213361201-10854-1-git-send-email-markmc@redhat.com>

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>
---
 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 ab0aca7..fc85cba 100644
--- a/drivers/virtio/virtio.c
+++ b/drivers/virtio/virtio.c
@@ -117,9 +117,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;
 }
-- 
1.5.4.1


  reply	other threads:[~2008-06-13 12:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-13 12:46 [PATCH 1/2] virtio: Use bus_type probe and remove methods Mark McLoughlin
2008-06-13 12:46 ` Mark McLoughlin [this message]
2008-06-14  4:13   ` [PATCH 2/2] virtio: Complete feature negotation before updating status Rusty Russell
2008-06-14  4:02 ` [PATCH 1/2] virtio: Use bus_type probe and remove methods Rusty Russell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1213361201-10854-2-git-send-email-markmc@redhat.com \
    --to=markmc@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox