* [Qemu-devel] [PATCH] virtio: invoke set_status callback on reset
@ 2010-09-27 16:32 Michael S. Tsirkin
0 siblings, 0 replies; only message in thread
From: Michael S. Tsirkin @ 2010-09-27 16:32 UTC (permalink / raw)
To: qemu-devel, Anthony Liguori, Alex Williamson
As status is set to 0 on reset, invoke the
relevant callback. This makes for a cleaner
code in devices as they don't need to
duplicate the code in their reset routine,
as well as excercises this path a little more.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/virtio.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/hw/virtio.c b/hw/virtio.c
index 4475bb3..d7b5853 100644
--- a/hw/virtio.c
+++ b/hw/virtio.c
@@ -443,6 +443,8 @@ void virtio_reset(void *opaque)
VirtIODevice *vdev = opaque;
int i;
+ virtio_set_status(vdev, 0);
+
if (vdev->reset)
vdev->reset(vdev);
--
1.7.3-rc1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-09-27 16:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-27 16:32 [Qemu-devel] [PATCH] virtio: invoke set_status callback on reset Michael S. Tsirkin
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.