* [PATCH] virtio: don't set VIRTIO_CONFIG_S_DRIVER_OK twice.
@ 2015-02-13 5:07 Rusty Russell
0 siblings, 0 replies; 2+ messages in thread
From: Rusty Russell @ 2015-02-13 5:07 UTC (permalink / raw)
To: virtualization, lkml, Michael S. Tsirkin
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);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] virtio: don't set VIRTIO_CONFIG_S_DRIVER_OK twice.
@ 2015-02-13 5:07 Rusty Russell
0 siblings, 0 replies; 2+ messages in thread
From: Rusty Russell @ 2015-02-13 5:07 UTC (permalink / raw)
To: virtualization, lkml, Michael S. Tsirkin
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);
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-02-13 5:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-13 5:07 [PATCH] virtio: don't set VIRTIO_CONFIG_S_DRIVER_OK twice Rusty Russell
-- strict thread matches above, loose matches on Subject: below --
2015-02-13 5:07 Rusty Russell
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.