aboutsummaryrefslogtreecommitdiff
path: root/hw/scsi-bus.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2011-08-03 10:49:18 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2011-08-12 08:31:28 -0500
commitc7b488721d6aafe32994ac63f8d690ae6d4729fa (patch)
treed2924e0c0ca4744c71e76f169643b2437604a4a0 /hw/scsi-bus.c
parent6dc06f08b3d6c0347df00ac68d9f30e2b233a749 (diff)
downloadqemu-c7b488721d6aafe32994ac63f8d690ae6d4729fa.zip
qemu-c7b488721d6aafe32994ac63f8d690ae6d4729fa.tar.gz
qemu-c7b488721d6aafe32994ac63f8d690ae6d4729fa.tar.bz2
scsi: report unit attention on reset
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/scsi-bus.c')
-rw-r--r--hw/scsi-bus.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c
index 564b840..9b2d12d 100644
--- a/hw/scsi-bus.c
+++ b/hw/scsi-bus.c
@@ -1099,7 +1099,7 @@ void scsi_req_abort(SCSIRequest *req, int status)
scsi_req_complete(req, status);
}
-void scsi_device_purge_requests(SCSIDevice *sdev)
+void scsi_device_purge_requests(SCSIDevice *sdev, SCSISense sense)
{
SCSIRequest *req;
@@ -1107,6 +1107,7 @@ void scsi_device_purge_requests(SCSIDevice *sdev)
req = QTAILQ_FIRST(&sdev->requests);
scsi_req_cancel(req);
}
+ sdev->unit_attention = sense;
}
static char *scsibus_get_fw_dev_path(DeviceState *dev)