Thread (40 messages) 40 messages, 6 authors, 2014-11-11
STALE4221d
Revisions (3)
  1. v3 [diff vs current]
  2. v4 current
  3. v4 [diff vs current]

[PATCH v4 18/25] virtio_scsi: enable VQs early on restore

From: "Michael S. Tsirkin" <mst@redhat.com>
Date: 2014-10-13 07:48:07
Also in: kvm, linux-s390, linux-scsi, lkml
Subsystem: scsi subsystem, the rest, virtio block and scsi drivers · Maintainers: "James E.J. Bottomley", "Martin K. Petersen", Linus Torvalds, "Michael S. Tsirkin", Jason Wang

virtio spec requires drivers to set DRIVER_OK before using VQs.
This is set automatically after restore returns, virtio scsi violated
this rule on restore by kicking event vq within restore.

To fix, call virtio_device_ready before using event queue.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 drivers/scsi/virtio_scsi.c | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c
index 0642ce3..2b565b3 100644
--- a/drivers/scsi/virtio_scsi.c
+++ b/drivers/scsi/virtio_scsi.c
@@ -1054,6 +1054,8 @@ static int virtscsi_restore(struct virtio_device *vdev)
 		return err;
 	}
 
+	virtio_device_ready(vdev);
+
 	if (virtio_has_feature(vdev, VIRTIO_SCSI_F_HOTPLUG))
 		virtscsi_kick_event_all(vscsi);
 
-- 
MST
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help