summaryrefslogtreecommitdiffstats
path: root/hw/scsi-defs.h
diff options
context:
space:
mode:
authorHannes Reinecke2010-11-24 12:15:57 +0100
committerKevin Wolf2010-11-25 12:00:10 +0100
commitf017132793065abcdc4b9b78d7ca575eeb3de484 (patch)
treed27de56a7d96f0bf061e3bf8759ba918ee246298 /hw/scsi-defs.h
parentscsi: Increase the number of possible devices (diff)
downloadqemu-f017132793065abcdc4b9b78d7ca575eeb3de484.tar.gz
qemu-f017132793065abcdc4b9b78d7ca575eeb3de484.tar.xz
qemu-f017132793065abcdc4b9b78d7ca575eeb3de484.zip
scsi: Return SAM status codes
Traditionally, the linux stack is using SCSI status codes which are shifted by one as compared to those defined in SAM. A SCSI emulation should naturally return the SAM defined codes, not the linux ones. So to avoid any confusion this patch modifies the existing definitions to match those found in SAM and removes any (now obsolete) byte-shift from the returned status codes. Signed-off-by: Hannes Reinecke <hare@suse.de> Acked-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/scsi-defs.h')
-rw-r--r--hw/scsi-defs.h20
1 files changed, 11 insertions, 9 deletions
diff --git a/hw/scsi-defs.h b/hw/scsi-defs.h
index a4a3518eb8..1473ecbddc 100644
--- a/hw/scsi-defs.h
+++ b/hw/scsi-defs.h
@@ -111,18 +111,20 @@
#define BLANK 0xa1
/*
- * Status codes
+ * SAM Status codes
*/
#define GOOD 0x00
-#define CHECK_CONDITION 0x01
-#define CONDITION_GOOD 0x02
-#define BUSY 0x04
-#define INTERMEDIATE_GOOD 0x08
-#define INTERMEDIATE_C_GOOD 0x0a
-#define RESERVATION_CONFLICT 0x0c
-#define COMMAND_TERMINATED 0x11
-#define QUEUE_FULL 0x14
+#define CHECK_CONDITION 0x02
+#define CONDITION_GOOD 0x04
+#define BUSY 0x08
+#define INTERMEDIATE_GOOD 0x10
+#define INTERMEDIATE_C_GOOD 0x14
+#define RESERVATION_CONFLICT 0x18
+#define COMMAND_TERMINATED 0x22
+#define TASK_SET_FULL 0x28
+#define ACA_ACTIVE 0x30
+#define TASK_ABORTED 0x40
#define STATUS_MASK 0x3e