aboutsummaryrefslogtreecommitdiff
path: root/hw/scsi-bus.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2011-08-03 10:49:16 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2011-08-12 08:31:05 -0500
commita872a3049a7b9439879a496cf7cc147af8feb3ef (patch)
treef4c77194a35e61223e10a3b9ac3b7395e0fc05b6 /hw/scsi-bus.c
parent739df2150d7e6291d54b3d2dcbd9ed52078e991c (diff)
downloadqemu-a872a3049a7b9439879a496cf7cc147af8feb3ef.zip
qemu-a872a3049a7b9439879a496cf7cc147af8feb3ef.tar.gz
qemu-a872a3049a7b9439879a496cf7cc147af8feb3ef.tar.bz2
scsi: add a bunch more common sense codes
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.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c
index ab45226..bec8d82 100644
--- a/hw/scsi-bus.c
+++ b/hw/scsi-bus.c
@@ -696,6 +696,16 @@ const struct SCSISense sense_code_LUN_NOT_SUPPORTED = {
.key = ILLEGAL_REQUEST, .asc = 0x25, .ascq = 0x00
};
+/* Illegal request, Saving parameters not supported */
+const struct SCSISense sense_code_SAVING_PARAMS_NOT_SUPPORTED = {
+ .key = ILLEGAL_REQUEST, .asc = 0x39, .ascq = 0x00
+};
+
+/* Illegal request, Incompatible medium installed */
+const struct SCSISense sense_code_INCOMPATIBLE_MEDIUM = {
+ .key = ILLEGAL_REQUEST, .asc = 0x30, .ascq = 0x00
+};
+
/* Command aborted, I/O process terminated */
const struct SCSISense sense_code_IO_ERROR = {
.key = ABORTED_COMMAND, .asc = 0x00, .ascq = 0x06
@@ -711,6 +721,26 @@ const struct SCSISense sense_code_LUN_FAILURE = {
.key = ABORTED_COMMAND, .asc = 0x3e, .ascq = 0x01
};
+/* Unit attention, Power on, reset or bus device reset occurred */
+const struct SCSISense sense_code_RESET = {
+ .key = UNIT_ATTENTION, .asc = 0x29, .ascq = 0x00
+};
+
+/* Unit attention, Medium may have changed */
+const struct SCSISense sense_code_MEDIUM_CHANGED = {
+ .key = UNIT_ATTENTION, .asc = 0x28, .ascq = 0x00
+};
+
+/* Unit attention, Reported LUNs data has changed */
+const struct SCSISense sense_code_REPORTED_LUNS_CHANGED = {
+ .key = UNIT_ATTENTION, .asc = 0x3f, .ascq = 0x0e
+};
+
+/* Unit attention, Device internal reset */
+const struct SCSISense sense_code_DEVICE_INTERNAL_RESET = {
+ .key = UNIT_ATTENTION, .asc = 0x29, .ascq = 0x04
+};
+
/*
* scsi_build_sense
*