From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=37658 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P0GjV-000378-DU for qemu-devel@nongnu.org; Mon, 27 Sep 2010 12:39:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1P0GjO-00048v-GB for qemu-devel@nongnu.org; Mon, 27 Sep 2010 12:39:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49627) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P0GjO-00048j-1V for qemu-devel@nongnu.org; Mon, 27 Sep 2010 12:39:10 -0400 Date: Mon, 27 Sep 2010 18:32:52 +0200 From: "Michael S. Tsirkin" Message-ID: <20100927163252.GA7071@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] [PATCH] virtio: invoke set_status callback on reset List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, 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 --- 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