scsi: rename SERVICE_ACTION_IN to SERVICE_ACTION_IN_16
authorHannes Reinecke <hare@suse.de>
Mon, 17 Nov 2014 13:25:19 +0000 (14:25 +0100)
committerChristoph Hellwig <hch@lst.de>
Mon, 24 Nov 2014 19:01:40 +0000 (20:01 +0100)
SPC-3 defines SERVICE ACTION IN(12) and SERVICE ACTION IN(16).
So rename SERVICE_ACTION_IN to SERVICE_ACTION_IN_16 to be
consistent with SPC and to allow for better distinction.

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>
17 files changed:
block/scsi_ioctl.c
drivers/ata/libata-scsi.c
drivers/block/nvme-scsi.c
drivers/scsi/aacraid/aachba.c
drivers/scsi/aacraid/linit.c
drivers/scsi/constants.c
drivers/scsi/gdth.c
drivers/scsi/scsi_debug.c
drivers/scsi/scsi_trace.c
drivers/scsi/sd.c
drivers/target/target_core_alua.c
drivers/target/target_core_sbc.c
drivers/usb/gadget/legacy/tcm_usb_gadget.c
include/scsi/scsi.h
include/trace/events/scsi.h
include/trace/events/target.h
tools/lib/traceevent/plugin_scsi.c

index 1e053d911240b577df324912bb68af13e6174bcc..c7bbc190f16fe3ac7dc24a3b7215e16bd7919ac4 100644 (file)
@@ -142,7 +142,7 @@ static void blk_set_cmd_filter_defaults(struct blk_cmd_filter *filter)
        __set_bit(GPCMD_VERIFY_10, filter->read_ok);
        __set_bit(VERIFY_16, filter->read_ok);
        __set_bit(REPORT_LUNS, filter->read_ok);
-       __set_bit(SERVICE_ACTION_IN, filter->read_ok);
+       __set_bit(SERVICE_ACTION_IN_16, filter->read_ok);
        __set_bit(RECEIVE_DIAGNOSTIC, filter->read_ok);
        __set_bit(MAINTENANCE_IN, filter->read_ok);
        __set_bit(GPCMD_READ_BUFFER_CAPACITY, filter->read_ok);
index c8bb6abbf12c70f459eeb0fe7b942c74157e307c..fc6a60abe518ea16ee3f25e6f657cf8efd3b0c3d 100644 (file)
@@ -3570,7 +3570,7 @@ void ata_scsi_simulate(struct ata_device *dev, struct scsi_cmnd *cmd)
                ata_scsi_rbuf_fill(&args, ata_scsiop_read_cap);
                break;
 
-       case SERVICE_ACTION_IN:
+       case SERVICE_ACTION_IN_16:
                if ((scsicmd[1] & 0x1f) == SAI_READ_CAPACITY_16)
                        ata_scsi_rbuf_fill(&args, ata_scsiop_read_cap);
                else
index a4cd6d691c63569f5e4757d5b32886edd7701815..0b4b2775600eafc2ec1be3afae29b92f5be4345c 100644 (file)
@@ -329,7 +329,7 @@ INQUIRY_EVPD_BIT_MASK) ? 1 : 0)
 (GET_U32_FROM_CDB(cdb, READ_CAP_16_CDB_ALLOC_LENGTH_OFFSET))
 
 #define IS_READ_CAP_16(cdb)                                    \
-((cdb[0] == SERVICE_ACTION_IN && cdb[1] == SAI_READ_CAPACITY_16) ? 1 : 0)
+((cdb[0] == SERVICE_ACTION_IN_16 && cdb[1] == SAI_READ_CAPACITY_16) ? 1 : 0)
 
 /* Request Sense Helper Macros */
 #define GET_REQUEST_SENSE_ALLOC_LENGTH(cdb)                    \
@@ -2947,7 +2947,7 @@ static int nvme_scsi_translate(struct nvme_ns *ns, struct sg_io_hdr *hdr)
        case READ_CAPACITY:
                retcode = nvme_trans_read_capacity(ns, hdr, cmd);
                break;
-       case SERVICE_ACTION_IN:
+       case SERVICE_ACTION_IN_16:
                if (IS_READ_CAP_16(cmd))
                        retcode = nvme_trans_read_capacity(ns, hdr, cmd);
                else
index 681434e2dfe9b77a4da7487cdc9e9f8e2a293715..b32e77db0c48186e866b63b4a8d0abcef895ea7b 100644 (file)
@@ -2181,7 +2181,7 @@ int aac_scsi_cmd(struct scsi_cmnd * scsicmd)
                          (fsa_dev_ptr[cid].sense_data.sense_key ==
                           NOT_READY)) {
                                switch (scsicmd->cmnd[0]) {
-                               case SERVICE_ACTION_IN:
+                               case SERVICE_ACTION_IN_16:
                                        if (!(dev->raw_io_interface) ||
                                            !(dev->raw_io_64) ||
                                            ((scsicmd->cmnd[1] & 0x1f) != SAI_READ_CAPACITY_16))
@@ -2309,7 +2309,7 @@ int aac_scsi_cmd(struct scsi_cmnd * scsicmd)
                scsi_sg_copy_from_buffer(scsicmd, &inq_data, sizeof(inq_data));
                return aac_get_container_name(scsicmd);
        }
-       case SERVICE_ACTION_IN:
+       case SERVICE_ACTION_IN_16:
                if (!(dev->raw_io_interface) ||
                    !(dev->raw_io_64) ||
                    ((scsicmd->cmnd[1] & 0x1f) != SAI_READ_CAPACITY_16))
index 41b9c68bca671675fc1f21e0bd721c08c7d253d8..4c340d88c33d9c0f73269d53846b486c71ab00de 100644 (file)
@@ -555,7 +555,7 @@ static int aac_eh_abort(struct scsi_cmnd* cmd)
                AAC_DRIVERNAME,
                host->host_no, sdev_channel(dev), sdev_id(dev), dev->lun);
        switch (cmd->cmnd[0]) {
-       case SERVICE_ACTION_IN:
+       case SERVICE_ACTION_IN_16:
                if (!(aac->raw_io_interface) ||
                    !(aac->raw_io_64) ||
                    ((cmd->cmnd[1] & 0x1f) != SAI_READ_CAPACITY_16))
index 0cf43f6e464b19e9148b4d69699ba8c83b79b773..52afabd23d9f5d1342e9cbda85c7ab9cda487f77 100644 (file)
@@ -24,7 +24,6 @@
 #define SERVICE_ACTION_IN_12 0xab
 #define SERVICE_ACTION_OUT_12 0xa9
 #define SERVICE_ACTION_BIDIRECTIONAL 0x9d
-#define SERVICE_ACTION_IN_16 0x9e
 #define SERVICE_ACTION_OUT_16 0x9f
 #define THIRD_PARTY_COPY_OUT 0x83
 #define THIRD_PARTY_COPY_IN 0x84
index 4ebbeae161e25cb2356b8aa6988764901542261c..71e1380443797d7ed38d26dba6f01d335b4068bb 100644 (file)
@@ -2159,7 +2159,7 @@ static void gdth_next(gdth_ha_str *ha)
               case VERIFY:
               case START_STOP:
               case MODE_SENSE:
-              case SERVICE_ACTION_IN:
+              case SERVICE_ACTION_IN_16:
                 TRACE(("cache cmd %x/%x/%x/%x/%x/%x\n",nscp->cmnd[0],
                        nscp->cmnd[1],nscp->cmnd[2],nscp->cmnd[3],
                        nscp->cmnd[4],nscp->cmnd[5]));
@@ -2391,7 +2391,7 @@ static int gdth_internal_cache_cmd(gdth_ha_str *ha, Scsi_Cmnd *scp)
         gdth_copy_internal_data(ha, scp, (char*)&rdc, sizeof(gdth_rdcap_data));
         break;
 
-      case SERVICE_ACTION_IN:
+      case SERVICE_ACTION_IN_16:
         if ((scp->cmnd[1] & 0x1f) == SAI_READ_CAPACITY_16 &&
             (ha->cache_feat & GDT_64BIT)) {
             gdth_rdcap16_data rdc16;
index b02571390d01de63558051099e26c17a440f0bd8..378e0aae29ca6f50d6ce201eeaa73cda4b435709 100644 (file)
@@ -4210,7 +4210,7 @@ scsi_debug_queuecommand(struct scsi_cmnd *SCpnt)
        case READ_CAPACITY:
                errsts = resp_readcap(SCpnt, devip);
                break;
-       case SERVICE_ACTION_IN:
+       case SERVICE_ACTION_IN_16:
                if (cmd[1] == SAI_READ_CAPACITY_16)
                        errsts = resp_readcap16(SCpnt, devip);
                else if (cmd[1] == SAI_GET_LBA_STATUS) {
index 503594e5f76d91fb96ca106bf5d42332e0335025..82af28b90294fe785d8b22fa87ab38d428ac0ab6 100644 (file)
@@ -278,7 +278,7 @@ scsi_trace_parse_cdb(struct trace_seq *p, unsigned char *cdb, int len)
                return scsi_trace_rw16(p, cdb, len);
        case UNMAP:
                return scsi_trace_unmap(p, cdb, len);
-       case SERVICE_ACTION_IN:
+       case SERVICE_ACTION_IN_16:
                return scsi_trace_service_action_in(p, cdb, len);
        case VARIABLE_LENGTH_CMD:
                return scsi_trace_varlen(p, cdb, len);
index 54abcb220ab478eb951c5f32d4370b090c6bc895..fedab3c21ddf18adcb291a99c49b7b4ac051aa85 100644 (file)
@@ -1982,7 +1982,7 @@ static int read_capacity_16(struct scsi_disk *sdkp, struct scsi_device *sdp,
 
        do {
                memset(cmd, 0, 16);
-               cmd[0] = SERVICE_ACTION_IN;
+               cmd[0] = SERVICE_ACTION_IN_16;
                cmd[1] = SAI_READ_CAPACITY_16;
                cmd[13] = RC16_LEN;
                memset(buffer, 0, RC16_LEN);
index fb87780929d24f99d304b2e904538bb7c45f0bd6..75cbde1f7c5b6e34ea7060011c2aca817e4e55f2 100644 (file)
@@ -576,7 +576,7 @@ static inline int core_alua_state_standby(
        case SEND_DIAGNOSTIC:
        case READ_CAPACITY:
                return 0;
-       case SERVICE_ACTION_IN:
+       case SERVICE_ACTION_IN_16:
                switch (cdb[1] & 0x1f) {
                case SAI_READ_CAPACITY_16:
                        return 0;
index ebe62afb957dbcf0c113f2315e517051f9fff4dd..8d171ff77e75d48f4ba443f5f896c44f6453f292 100644 (file)
@@ -852,7 +852,7 @@ sbc_parse_cdb(struct se_cmd *cmd, struct sbc_ops *ops)
                size = READ_CAP_LEN;
                cmd->execute_cmd = sbc_emulate_readcapacity;
                break;
-       case SERVICE_ACTION_IN:
+       case SERVICE_ACTION_IN_16:
                switch (cmd->t_task_cdb[1] & 0x1f) {
                case SAI_READ_CAPACITY_16:
                        cmd->execute_cmd = sbc_emulate_readcapacity_16;
index 6cdb7a534f2384d7782f0ba751e6a037dbf44b28..024f58475a94a953a2c1171a5efdb5b8eb201fbd 100644 (file)
@@ -912,7 +912,7 @@ static int get_cmd_dir(const unsigned char *cdb)
        case INQUIRY:
        case MODE_SENSE:
        case MODE_SENSE_10:
-       case SERVICE_ACTION_IN:
+       case SERVICE_ACTION_IN_16:
        case MAINTENANCE_IN:
        case PERSISTENT_RESERVE_IN:
        case SECURITY_PROTOCOL_IN:
index d17178e6fcdd738a6e178d4e7ea226895a815827..b354c0de324e43a71f182956e0a483e373a9987f 100644 (file)
@@ -151,7 +151,7 @@ enum scsi_timeouts {
 #define VERIFY_16            0x8f
 #define SYNCHRONIZE_CACHE_16  0x91
 #define WRITE_SAME_16        0x93
-#define SERVICE_ACTION_IN     0x9e
+#define SERVICE_ACTION_IN_16  0x9e
 /* values for service action in */
 #define        SAI_READ_CAPACITY_16  0x10
 #define SAI_GET_LBA_STATUS    0x12
index db6c93510f74633fc032a2984a8624e36070b2bb..079bd10a01b4b3b2b1897cc281cbdb6fde605181 100644 (file)
@@ -94,7 +94,7 @@
                scsi_opcode_name(WRITE_16),                     \
                scsi_opcode_name(VERIFY_16),                    \
                scsi_opcode_name(WRITE_SAME_16),                \
-               scsi_opcode_name(SERVICE_ACTION_IN),            \
+               scsi_opcode_name(SERVICE_ACTION_IN_16),         \
                scsi_opcode_name(SAI_READ_CAPACITY_16),         \
                scsi_opcode_name(SAI_GET_LBA_STATUS),           \
                scsi_opcode_name(MI_REPORT_TARGET_PGS),         \
index da9cc0f05c93843e713923fc1b5d063e7d444cae..45403443dd82ed3ae3ae07813db72bda164c0de5 100644 (file)
@@ -96,7 +96,7 @@
                scsi_opcode_name(WRITE_16),                     \
                scsi_opcode_name(VERIFY_16),                    \
                scsi_opcode_name(WRITE_SAME_16),                \
-               scsi_opcode_name(SERVICE_ACTION_IN),            \
+               scsi_opcode_name(SERVICE_ACTION_IN_16),         \
                scsi_opcode_name(SAI_READ_CAPACITY_16),         \
                scsi_opcode_name(SAI_GET_LBA_STATUS),           \
                scsi_opcode_name(MI_REPORT_TARGET_PGS),         \
index eda326fc86203c87537325e905569e3439bdc304..c699f477a101d47e09f4a41b2e09b48ec1033b12 100644 (file)
@@ -107,7 +107,7 @@ typedef unsigned int u32;
 #define VERIFY_16                      0x8f
 #define SYNCHRONIZE_CACHE_16           0x91
 #define WRITE_SAME_16                  0x93
-#define SERVICE_ACTION_IN              0x9e
+#define SERVICE_ACTION_IN_16           0x9e
 /* values for service action in */
 #define        SAI_READ_CAPACITY_16            0x10
 #define SAI_GET_LBA_STATUS             0x12
@@ -393,7 +393,7 @@ scsi_trace_parse_cdb(struct trace_seq *p, unsigned char *cdb, int len)
                return scsi_trace_rw16(p, cdb, len);
        case UNMAP:
                return scsi_trace_unmap(p, cdb, len);
-       case SERVICE_ACTION_IN:
+       case SERVICE_ACTION_IN_16:
                return scsi_trace_service_action_in(p, cdb, len);
        case VARIABLE_LENGTH_CMD:
                return scsi_trace_varlen(p, cdb, len);