Skip to content
Snippets Groups Projects
Commit 8006040d authored by Michael S. Tsirkin's avatar Michael S. Tsirkin Committed by Anthony Liguori
Browse files

virtio: invoke set_status callback on reset


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.

In particular this makes it possible to unify
vhost-net handling code with the following patch.

Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
(cherry picked from commit e0c472d8)
parent 456496e2
No related branches found
No related tags found
No related merge requests found
...@@ -453,6 +453,8 @@ void virtio_reset(void *opaque) ...@@ -453,6 +453,8 @@ void virtio_reset(void *opaque)
VirtIODevice *vdev = opaque; VirtIODevice *vdev = opaque;
int i; int i;
virtio_set_status(vdev, 0);
if (vdev->reset) if (vdev->reset)
vdev->reset(vdev); vdev->reset(vdev);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment