diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2022-03-30 02:19:16 -0400 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2022-03-30 04:18:14 -0400 |
commit | 7414539c5f2e43bad67ae88a3612455d01583429 (patch) | |
tree | 3bb19053ce71187cbb49810d8936e72a775cd91a /drivers/virtio | |
parent | ad6dc1daaf29f97f23cc810d60ee01c0e83f4c6b (diff) | |
download | lwn-7414539c5f2e43bad67ae88a3612455d01583429.tar.gz lwn-7414539c5f2e43bad67ae88a3612455d01583429.zip |
Revert "virtio: use virtio_device_ready() in virtio_device_restore()"
This reverts commit 8d65bc9a5be3f23c5e2ab36b6b8ef40095165b18.
We reverted the problematic changes, no more need for work
arounds on restore.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'drivers/virtio')
-rw-r--r-- | drivers/virtio/virtio.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c index 75c8d560bbd3..22f15f444f75 100644 --- a/drivers/virtio/virtio.c +++ b/drivers/virtio/virtio.c @@ -526,9 +526,8 @@ int virtio_device_restore(struct virtio_device *dev) goto err; } - /* If restore didn't do it, mark device DRIVER_OK ourselves. */ - if (!(dev->config->get_status(dev) & VIRTIO_CONFIG_S_DRIVER_OK)) - virtio_device_ready(dev); + /* Finally, tell the device we're all set */ + virtio_add_status(dev, VIRTIO_CONFIG_S_DRIVER_OK); virtio_config_enable(dev); |