projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d0508c3
)
virtio-scsi: abort in-flight I/O when the device is reset
author
Paolo Bonzini
<pbonzini@redhat.com>
Thu, 10 Jan 2013 14:49:08 +0000
(15:49 +0100)
committer
Anthony Liguori
<aliguori@us.ibm.com>
Thu, 10 Jan 2013 21:22:42 +0000
(15:22 -0600)
When the device is reset, the SCSI bus should also be reset so
that in-flight I/O is cancelled.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/virtio-scsi.c
patch
|
blob
|
history
diff --git
a/hw/virtio-scsi.c
b/hw/virtio-scsi.c
index bfe18605056ce8e811cad2dfe8efd447e2f3be45..0715865489a351ad2e6293c524267cbf561b55fd 100644
(file)
--- a/
hw/virtio-scsi.c
+++ b/
hw/virtio-scsi.c
@@
-565,6
+565,10
@@
static void virtio_scsi_reset(VirtIODevice *vdev)
{
VirtIOSCSI *s = (VirtIOSCSI *)vdev;
+ s->resetting++;
+ qbus_reset_all(&s->bus.qbus);
+ s->resetting--;
+
s->sense_size = VIRTIO_SCSI_SENSE_SIZE;
s->cdb_size = VIRTIO_SCSI_CDB_SIZE;
s->events_dropped = false;