scsi: add SPC-3 command definitions
authorHannes Reinecke <hare@suse.de>
Mon, 17 Nov 2014 13:25:20 +0000 (14:25 +0100)
committerChristoph Hellwig <hch@lst.de>
Mon, 24 Nov 2014 19:01:44 +0000 (20:01 +0100)
SPC-3 defines SERVICE ACTION IN(12), SERVICE_ACTION OUT(12),
SERVICE ACTION OUT(16), and SERVICE ACTION BIDIRECTIONAL.
And READ MEDIA SERIAL NUMBER has long since been deprecated.
So update callers to refer to the new cdb name.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Tested-by: Robert Elliott <elliott@hp.com>
Reviewed-by: Robert Elliott <elliott@hp.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/scsi/constants.c
drivers/target/target_core_pr.c
include/scsi/scsi.h
tools/lib/traceevent/plugin_scsi.c

index 52afabd23d9f5d1342e9cbda85c7ab9cda487f77..aee62f60b43d90d3ec327a6d5fc999ecd2faaa5d 100644 (file)
 
 
 /* Commands with service actions that change the command name */
-#define SERVICE_ACTION_IN_12 0xab
-#define SERVICE_ACTION_OUT_12 0xa9
-#define SERVICE_ACTION_BIDIRECTIONAL 0x9d
-#define SERVICE_ACTION_OUT_16 0x9f
 #define THIRD_PARTY_COPY_OUT 0x83
 #define THIRD_PARTY_COPY_IN 0x84
 
index 8c60a1a1ae8dab96a63a382b572ecb7e83e1baf6..806bfba894cad887be0b3bca49a0d6f81c7cc71e 100644 (file)
@@ -459,7 +459,7 @@ static int core_scsi3_pr_seq_non_holder(
        case ACCESS_CONTROL_OUT:
        case INQUIRY:
        case LOG_SENSE:
-       case READ_MEDIA_SERIAL_NUMBER:
+       case SERVICE_ACTION_IN_12:
        case REPORT_LUNS:
        case REQUEST_SENSE:
        case PERSISTENT_RESERVE_IN:
index b354c0de324e43a71f182956e0a483e373a9987f..8a7f8ad58aac2567b51b6c8e934077c4d16058be 100644 (file)
@@ -128,8 +128,10 @@ enum scsi_timeouts {
 #define MOVE_MEDIUM           0xa5
 #define EXCHANGE_MEDIUM       0xa6
 #define READ_12               0xa8
+#define SERVICE_ACTION_OUT_12 0xa9
 #define WRITE_12              0xaa
-#define READ_MEDIA_SERIAL_NUMBER 0xab
+#define READ_MEDIA_SERIAL_NUMBER 0xab /* Obsolete with SPC-2 */
+#define SERVICE_ACTION_IN_12  0xab
 #define WRITE_VERIFY_12       0xae
 #define VERIFY_12            0xaf
 #define SEARCH_HIGH_12        0xb0
@@ -151,7 +153,9 @@ enum scsi_timeouts {
 #define VERIFY_16            0x8f
 #define SYNCHRONIZE_CACHE_16  0x91
 #define WRITE_SAME_16        0x93
+#define SERVICE_ACTION_BIDIRECTIONAL 0x9d
 #define SERVICE_ACTION_IN_16  0x9e
+#define SERVICE_ACTION_OUT_16 0x9f
 /* values for service action in */
 #define        SAI_READ_CAPACITY_16  0x10
 #define SAI_GET_LBA_STATUS    0x12
@@ -165,8 +169,8 @@ enum scsi_timeouts {
 #define MI_REPORT_ALIASES     0x0b
 #define MI_REPORT_SUPPORTED_OPERATION_CODES 0x0c
 #define MI_REPORT_SUPPORTED_TASK_MANAGEMENT_FUNCTIONS 0x0d
-#define MI_REPORT_PRIORITY   0x0e
-#define MI_REPORT_TIMESTAMP  0x0f
+#define MI_REPORT_PRIORITY    0x0e
+#define MI_REPORT_TIMESTAMP   0x0f
 #define MI_MANAGEMENT_PROTOCOL_IN 0x10
 /* value for MI_REPORT_TARGET_PGS ext header */
 #define MI_EXT_HDR_PARAM_FMT  0x20
index c699f477a101d47e09f4a41b2e09b48ec1033b12..3727de48c8d50267c4c9cd1df33af69a1ff12643 100644 (file)
@@ -85,8 +85,9 @@ typedef unsigned int u32;
 #define MOVE_MEDIUM                    0xa5
 #define EXCHANGE_MEDIUM                        0xa6
 #define READ_12                                0xa8
+#define SERVICE_ACTION_OUT_12          0xa9
 #define WRITE_12                       0xaa
-#define READ_MEDIA_SERIAL_NUMBER       0xab
+#define SERVICE_ACTION_IN_12           0xab
 #define WRITE_VERIFY_12                        0xae
 #define VERIFY_12                      0xaf
 #define SEARCH_HIGH_12                 0xb0
@@ -107,7 +108,9 @@ typedef unsigned int u32;
 #define VERIFY_16                      0x8f
 #define SYNCHRONIZE_CACHE_16           0x91
 #define WRITE_SAME_16                  0x93
+#define SERVICE_ACTION_BIDIRECTIONAL   0x9d
 #define SERVICE_ACTION_IN_16           0x9e
+#define SERVICE_ACTION_OUT_16          0x9f
 /* values for service action in */
 #define        SAI_READ_CAPACITY_16            0x10
 #define SAI_GET_LBA_STATUS             0x12