From: Rusty Russell <rusty@rustcorp.com.au>
To: <virtualization@lists.linux-foundation.org>,
"lkml" <linux-kernel@vger.kernel.org>,
"Michael S. Tsirkin" <mst@redhat.com>
Subject: [PATCH] virtio: don't set VIRTIO_CONFIG_S_DRIVER_OK twice.
Date: Fri, 13 Feb 2015 15:37:17 +1030 [thread overview]
Message-ID: <87pp9e9z7e.fsf@rustcorp.com.au> (raw)
I noticed this with the console device. It's not *wrong*, just a bit
weird.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c
index b9f70dfc4751..5ce2aa48fc6e 100644
--- a/drivers/virtio/virtio.c
+++ b/drivers/virtio/virtio.c
@@ -236,7 +236,10 @@ static int virtio_dev_probe(struct device *_d)
if (err)
goto err;
- add_status(dev, VIRTIO_CONFIG_S_DRIVER_OK);
+ /* If probe didn't do it, mark device DRIVER_OK ourselves. */
+ if (!(dev->config->get_status(dev) & VIRTIO_CONFIG_S_DRIVER_OK))
+ virtio_device_ready(dev);
+
if (drv->scan)
drv->scan(dev);
next reply other threads:[~2015-02-13 5:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-13 5:07 Rusty Russell [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-02-13 5:07 [PATCH] virtio: don't set VIRTIO_CONFIG_S_DRIVER_OK twice 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=87pp9e9z7e.fsf@rustcorp.com.au \
--to=rusty@rustcorp.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.