提交 eb846d9f 编写于 作者: H Hannes Reinecke 提交者: Christoph Hellwig

scsi: rename SERVICE_ACTION_IN to SERVICE_ACTION_IN_16

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: NHannes Reinecke <hare@suse.de>
Tested-by: NRobert Elliott <elliott@hp.com>
Reviewed-by: NRobert Elliott <elliott@hp.com>
Signed-off-by: NChristoph Hellwig <hch@lst.de>
上级 3af6b352
...@@ -142,7 +142,7 @@ static void blk_set_cmd_filter_defaults(struct blk_cmd_filter *filter) ...@@ -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(GPCMD_VERIFY_10, filter->read_ok);
__set_bit(VERIFY_16, filter->read_ok); __set_bit(VERIFY_16, filter->read_ok);
__set_bit(REPORT_LUNS, 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(RECEIVE_DIAGNOSTIC, filter->read_ok);
__set_bit(MAINTENANCE_IN, filter->read_ok); __set_bit(MAINTENANCE_IN, filter->read_ok);
__set_bit(GPCMD_READ_BUFFER_CAPACITY, filter->read_ok); __set_bit(GPCMD_READ_BUFFER_CAPACITY, filter->read_ok);
......
...@@ -3570,7 +3570,7 @@ void ata_scsi_simulate(struct ata_device *dev, struct scsi_cmnd *cmd) ...@@ -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); ata_scsi_rbuf_fill(&args, ata_scsiop_read_cap);
break; break;
case SERVICE_ACTION_IN: case SERVICE_ACTION_IN_16:
if ((scsicmd[1] & 0x1f) == SAI_READ_CAPACITY_16) if ((scsicmd[1] & 0x1f) == SAI_READ_CAPACITY_16)
ata_scsi_rbuf_fill(&args, ata_scsiop_read_cap); ata_scsi_rbuf_fill(&args, ata_scsiop_read_cap);
else else
......
...@@ -329,7 +329,7 @@ INQUIRY_EVPD_BIT_MASK) ? 1 : 0) ...@@ -329,7 +329,7 @@ INQUIRY_EVPD_BIT_MASK) ? 1 : 0)
(GET_U32_FROM_CDB(cdb, READ_CAP_16_CDB_ALLOC_LENGTH_OFFSET)) (GET_U32_FROM_CDB(cdb, READ_CAP_16_CDB_ALLOC_LENGTH_OFFSET))
#define IS_READ_CAP_16(cdb) \ #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 */ /* Request Sense Helper Macros */
#define GET_REQUEST_SENSE_ALLOC_LENGTH(cdb) \ #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) ...@@ -2947,7 +2947,7 @@ static int nvme_scsi_translate(struct nvme_ns *ns, struct sg_io_hdr *hdr)
case READ_CAPACITY: case READ_CAPACITY:
retcode = nvme_trans_read_capacity(ns, hdr, cmd); retcode = nvme_trans_read_capacity(ns, hdr, cmd);
break; break;
case SERVICE_ACTION_IN: case SERVICE_ACTION_IN_16:
if (IS_READ_CAP_16(cmd)) if (IS_READ_CAP_16(cmd))
retcode = nvme_trans_read_capacity(ns, hdr, cmd); retcode = nvme_trans_read_capacity(ns, hdr, cmd);
else else
......
...@@ -2181,7 +2181,7 @@ int aac_scsi_cmd(struct scsi_cmnd * scsicmd) ...@@ -2181,7 +2181,7 @@ int aac_scsi_cmd(struct scsi_cmnd * scsicmd)
(fsa_dev_ptr[cid].sense_data.sense_key == (fsa_dev_ptr[cid].sense_data.sense_key ==
NOT_READY)) { NOT_READY)) {
switch (scsicmd->cmnd[0]) { switch (scsicmd->cmnd[0]) {
case SERVICE_ACTION_IN: case SERVICE_ACTION_IN_16:
if (!(dev->raw_io_interface) || if (!(dev->raw_io_interface) ||
!(dev->raw_io_64) || !(dev->raw_io_64) ||
((scsicmd->cmnd[1] & 0x1f) != SAI_READ_CAPACITY_16)) ((scsicmd->cmnd[1] & 0x1f) != SAI_READ_CAPACITY_16))
...@@ -2309,7 +2309,7 @@ int aac_scsi_cmd(struct scsi_cmnd * scsicmd) ...@@ -2309,7 +2309,7 @@ int aac_scsi_cmd(struct scsi_cmnd * scsicmd)
scsi_sg_copy_from_buffer(scsicmd, &inq_data, sizeof(inq_data)); scsi_sg_copy_from_buffer(scsicmd, &inq_data, sizeof(inq_data));
return aac_get_container_name(scsicmd); return aac_get_container_name(scsicmd);
} }
case SERVICE_ACTION_IN: case SERVICE_ACTION_IN_16:
if (!(dev->raw_io_interface) || if (!(dev->raw_io_interface) ||
!(dev->raw_io_64) || !(dev->raw_io_64) ||
((scsicmd->cmnd[1] & 0x1f) != SAI_READ_CAPACITY_16)) ((scsicmd->cmnd[1] & 0x1f) != SAI_READ_CAPACITY_16))
......
...@@ -555,7 +555,7 @@ static int aac_eh_abort(struct scsi_cmnd* cmd) ...@@ -555,7 +555,7 @@ static int aac_eh_abort(struct scsi_cmnd* cmd)
AAC_DRIVERNAME, AAC_DRIVERNAME,
host->host_no, sdev_channel(dev), sdev_id(dev), dev->lun); host->host_no, sdev_channel(dev), sdev_id(dev), dev->lun);
switch (cmd->cmnd[0]) { switch (cmd->cmnd[0]) {
case SERVICE_ACTION_IN: case SERVICE_ACTION_IN_16:
if (!(aac->raw_io_interface) || if (!(aac->raw_io_interface) ||
!(aac->raw_io_64) || !(aac->raw_io_64) ||
((cmd->cmnd[1] & 0x1f) != SAI_READ_CAPACITY_16)) ((cmd->cmnd[1] & 0x1f) != SAI_READ_CAPACITY_16))
......
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
#define SERVICE_ACTION_IN_12 0xab #define SERVICE_ACTION_IN_12 0xab
#define SERVICE_ACTION_OUT_12 0xa9 #define SERVICE_ACTION_OUT_12 0xa9
#define SERVICE_ACTION_BIDIRECTIONAL 0x9d #define SERVICE_ACTION_BIDIRECTIONAL 0x9d
#define SERVICE_ACTION_IN_16 0x9e
#define SERVICE_ACTION_OUT_16 0x9f #define SERVICE_ACTION_OUT_16 0x9f
#define THIRD_PARTY_COPY_OUT 0x83 #define THIRD_PARTY_COPY_OUT 0x83
#define THIRD_PARTY_COPY_IN 0x84 #define THIRD_PARTY_COPY_IN 0x84
......
...@@ -2159,7 +2159,7 @@ static void gdth_next(gdth_ha_str *ha) ...@@ -2159,7 +2159,7 @@ static void gdth_next(gdth_ha_str *ha)
case VERIFY: case VERIFY:
case START_STOP: case START_STOP:
case MODE_SENSE: 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], TRACE(("cache cmd %x/%x/%x/%x/%x/%x\n",nscp->cmnd[0],
nscp->cmnd[1],nscp->cmnd[2],nscp->cmnd[3], nscp->cmnd[1],nscp->cmnd[2],nscp->cmnd[3],
nscp->cmnd[4],nscp->cmnd[5])); nscp->cmnd[4],nscp->cmnd[5]));
...@@ -2391,7 +2391,7 @@ static int gdth_internal_cache_cmd(gdth_ha_str *ha, Scsi_Cmnd *scp) ...@@ -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)); gdth_copy_internal_data(ha, scp, (char*)&rdc, sizeof(gdth_rdcap_data));
break; break;
case SERVICE_ACTION_IN: case SERVICE_ACTION_IN_16:
if ((scp->cmnd[1] & 0x1f) == SAI_READ_CAPACITY_16 && if ((scp->cmnd[1] & 0x1f) == SAI_READ_CAPACITY_16 &&
(ha->cache_feat & GDT_64BIT)) { (ha->cache_feat & GDT_64BIT)) {
gdth_rdcap16_data rdc16; gdth_rdcap16_data rdc16;
......
...@@ -4210,7 +4210,7 @@ scsi_debug_queuecommand(struct scsi_cmnd *SCpnt) ...@@ -4210,7 +4210,7 @@ scsi_debug_queuecommand(struct scsi_cmnd *SCpnt)
case READ_CAPACITY: case READ_CAPACITY:
errsts = resp_readcap(SCpnt, devip); errsts = resp_readcap(SCpnt, devip);
break; break;
case SERVICE_ACTION_IN: case SERVICE_ACTION_IN_16:
if (cmd[1] == SAI_READ_CAPACITY_16) if (cmd[1] == SAI_READ_CAPACITY_16)
errsts = resp_readcap16(SCpnt, devip); errsts = resp_readcap16(SCpnt, devip);
else if (cmd[1] == SAI_GET_LBA_STATUS) { else if (cmd[1] == SAI_GET_LBA_STATUS) {
......
...@@ -278,7 +278,7 @@ scsi_trace_parse_cdb(struct trace_seq *p, unsigned char *cdb, int len) ...@@ -278,7 +278,7 @@ scsi_trace_parse_cdb(struct trace_seq *p, unsigned char *cdb, int len)
return scsi_trace_rw16(p, cdb, len); return scsi_trace_rw16(p, cdb, len);
case UNMAP: case UNMAP:
return scsi_trace_unmap(p, cdb, len); 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); return scsi_trace_service_action_in(p, cdb, len);
case VARIABLE_LENGTH_CMD: case VARIABLE_LENGTH_CMD:
return scsi_trace_varlen(p, cdb, len); return scsi_trace_varlen(p, cdb, len);
......
...@@ -1982,7 +1982,7 @@ static int read_capacity_16(struct scsi_disk *sdkp, struct scsi_device *sdp, ...@@ -1982,7 +1982,7 @@ static int read_capacity_16(struct scsi_disk *sdkp, struct scsi_device *sdp,
do { do {
memset(cmd, 0, 16); memset(cmd, 0, 16);
cmd[0] = SERVICE_ACTION_IN; cmd[0] = SERVICE_ACTION_IN_16;
cmd[1] = SAI_READ_CAPACITY_16; cmd[1] = SAI_READ_CAPACITY_16;
cmd[13] = RC16_LEN; cmd[13] = RC16_LEN;
memset(buffer, 0, RC16_LEN); memset(buffer, 0, RC16_LEN);
......
...@@ -576,7 +576,7 @@ static inline int core_alua_state_standby( ...@@ -576,7 +576,7 @@ static inline int core_alua_state_standby(
case SEND_DIAGNOSTIC: case SEND_DIAGNOSTIC:
case READ_CAPACITY: case READ_CAPACITY:
return 0; return 0;
case SERVICE_ACTION_IN: case SERVICE_ACTION_IN_16:
switch (cdb[1] & 0x1f) { switch (cdb[1] & 0x1f) {
case SAI_READ_CAPACITY_16: case SAI_READ_CAPACITY_16:
return 0; return 0;
......
...@@ -852,7 +852,7 @@ sbc_parse_cdb(struct se_cmd *cmd, struct sbc_ops *ops) ...@@ -852,7 +852,7 @@ sbc_parse_cdb(struct se_cmd *cmd, struct sbc_ops *ops)
size = READ_CAP_LEN; size = READ_CAP_LEN;
cmd->execute_cmd = sbc_emulate_readcapacity; cmd->execute_cmd = sbc_emulate_readcapacity;
break; break;
case SERVICE_ACTION_IN: case SERVICE_ACTION_IN_16:
switch (cmd->t_task_cdb[1] & 0x1f) { switch (cmd->t_task_cdb[1] & 0x1f) {
case SAI_READ_CAPACITY_16: case SAI_READ_CAPACITY_16:
cmd->execute_cmd = sbc_emulate_readcapacity_16; cmd->execute_cmd = sbc_emulate_readcapacity_16;
......
...@@ -912,7 +912,7 @@ static int get_cmd_dir(const unsigned char *cdb) ...@@ -912,7 +912,7 @@ static int get_cmd_dir(const unsigned char *cdb)
case INQUIRY: case INQUIRY:
case MODE_SENSE: case MODE_SENSE:
case MODE_SENSE_10: case MODE_SENSE_10:
case SERVICE_ACTION_IN: case SERVICE_ACTION_IN_16:
case MAINTENANCE_IN: case MAINTENANCE_IN:
case PERSISTENT_RESERVE_IN: case PERSISTENT_RESERVE_IN:
case SECURITY_PROTOCOL_IN: case SECURITY_PROTOCOL_IN:
......
...@@ -151,7 +151,7 @@ enum scsi_timeouts { ...@@ -151,7 +151,7 @@ enum scsi_timeouts {
#define VERIFY_16 0x8f #define VERIFY_16 0x8f
#define SYNCHRONIZE_CACHE_16 0x91 #define SYNCHRONIZE_CACHE_16 0x91
#define WRITE_SAME_16 0x93 #define WRITE_SAME_16 0x93
#define SERVICE_ACTION_IN 0x9e #define SERVICE_ACTION_IN_16 0x9e
/* values for service action in */ /* values for service action in */
#define SAI_READ_CAPACITY_16 0x10 #define SAI_READ_CAPACITY_16 0x10
#define SAI_GET_LBA_STATUS 0x12 #define SAI_GET_LBA_STATUS 0x12
......
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
scsi_opcode_name(WRITE_16), \ scsi_opcode_name(WRITE_16), \
scsi_opcode_name(VERIFY_16), \ scsi_opcode_name(VERIFY_16), \
scsi_opcode_name(WRITE_SAME_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_READ_CAPACITY_16), \
scsi_opcode_name(SAI_GET_LBA_STATUS), \ scsi_opcode_name(SAI_GET_LBA_STATUS), \
scsi_opcode_name(MI_REPORT_TARGET_PGS), \ scsi_opcode_name(MI_REPORT_TARGET_PGS), \
......
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
scsi_opcode_name(WRITE_16), \ scsi_opcode_name(WRITE_16), \
scsi_opcode_name(VERIFY_16), \ scsi_opcode_name(VERIFY_16), \
scsi_opcode_name(WRITE_SAME_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_READ_CAPACITY_16), \
scsi_opcode_name(SAI_GET_LBA_STATUS), \ scsi_opcode_name(SAI_GET_LBA_STATUS), \
scsi_opcode_name(MI_REPORT_TARGET_PGS), \ scsi_opcode_name(MI_REPORT_TARGET_PGS), \
......
...@@ -107,7 +107,7 @@ typedef unsigned int u32; ...@@ -107,7 +107,7 @@ typedef unsigned int u32;
#define VERIFY_16 0x8f #define VERIFY_16 0x8f
#define SYNCHRONIZE_CACHE_16 0x91 #define SYNCHRONIZE_CACHE_16 0x91
#define WRITE_SAME_16 0x93 #define WRITE_SAME_16 0x93
#define SERVICE_ACTION_IN 0x9e #define SERVICE_ACTION_IN_16 0x9e
/* values for service action in */ /* values for service action in */
#define SAI_READ_CAPACITY_16 0x10 #define SAI_READ_CAPACITY_16 0x10
#define SAI_GET_LBA_STATUS 0x12 #define SAI_GET_LBA_STATUS 0x12
...@@ -393,7 +393,7 @@ scsi_trace_parse_cdb(struct trace_seq *p, unsigned char *cdb, int len) ...@@ -393,7 +393,7 @@ scsi_trace_parse_cdb(struct trace_seq *p, unsigned char *cdb, int len)
return scsi_trace_rw16(p, cdb, len); return scsi_trace_rw16(p, cdb, len);
case UNMAP: case UNMAP:
return scsi_trace_unmap(p, cdb, len); 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); return scsi_trace_service_action_in(p, cdb, len);
case VARIABLE_LENGTH_CMD: case VARIABLE_LENGTH_CMD:
return scsi_trace_varlen(p, cdb, len); return scsi_trace_varlen(p, cdb, len);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册