aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2014-11-24 10:07:25 -0500
committerChristoph Hellwig <hch@lst.de>2014-12-04 03:58:33 -0500
commit68d81f40047cc4f99e86807e1160fb07a7b856c7 (patch)
treea1d260df122f4dd9c2830832e4b09b6075ee1323 /drivers
parent4e484896ac8b1877097770bc630802d5535e8d46 (diff)
scsi: remove MSG_*_TAG defines
For SPI drivers use the message definitions from scsi.h, and for target drivers introduce a new TCM_*_TAG namespace. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com
Diffstat (limited to 'drivers')
-rw-r--r--drivers/infiniband/ulp/srpt/ib_srpt.c10
-rw-r--r--drivers/scsi/advansys.c8
-rw-r--r--drivers/scsi/qla2xxx/qla_target.c12
-rw-r--r--drivers/scsi/scsi_debug.c1
-rw-r--r--drivers/scsi/scsi_transport_spi.c2
-rw-r--r--drivers/target/iscsi/iscsi_target.c14
-rw-r--r--drivers/target/loopback/tcm_loop.c4
-rw-r--r--drivers/target/sbp/sbp_target.c2
-rw-r--r--drivers/target/target_core_pscsi.c2
-rw-r--r--drivers/target/target_core_sbc.c2
-rw-r--r--drivers/target/target_core_spc.c4
-rw-r--r--drivers/target/target_core_transport.c16
-rw-r--r--drivers/target/tcm_fc/tfc_cmd.c8
-rw-r--r--drivers/usb/gadget/legacy/tcm_usb_gadget.c10
-rw-r--r--drivers/xen/xen-scsiback.c2
15 files changed, 48 insertions, 49 deletions
diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c
index 7206547c13ce..3a0ca61b02c8 100644
--- a/drivers/infiniband/ulp/srpt/ib_srpt.c
+++ b/drivers/infiniband/ulp/srpt/ib_srpt.c
@@ -1708,17 +1708,17 @@ static int srpt_handle_cmd(struct srpt_rdma_ch *ch,
1708 1708
1709 switch (srp_cmd->task_attr) { 1709 switch (srp_cmd->task_attr) {
1710 case SRP_CMD_SIMPLE_Q: 1710 case SRP_CMD_SIMPLE_Q:
1711 cmd->sam_task_attr = MSG_SIMPLE_TAG; 1711 cmd->sam_task_attr = TCM_SIMPLE_TAG;
1712 break; 1712 break;
1713 case SRP_CMD_ORDERED_Q: 1713 case SRP_CMD_ORDERED_Q:
1714 default: 1714 default:
1715 cmd->sam_task_attr = MSG_ORDERED_TAG; 1715 cmd->sam_task_attr = TCM_ORDERED_TAG;
1716 break; 1716 break;
1717 case SRP_CMD_HEAD_OF_Q: 1717 case SRP_CMD_HEAD_OF_Q:
1718 cmd->sam_task_attr = MSG_HEAD_TAG; 1718 cmd->sam_task_attr = TCM_HEAD_TAG;
1719 break; 1719 break;
1720 case SRP_CMD_ACA: 1720 case SRP_CMD_ACA:
1721 cmd->sam_task_attr = MSG_ACA_TAG; 1721 cmd->sam_task_attr = TCM_ACA_TAG;
1722 break; 1722 break;
1723 } 1723 }
1724 1724
@@ -1733,7 +1733,7 @@ static int srpt_handle_cmd(struct srpt_rdma_ch *ch,
1733 sizeof(srp_cmd->lun)); 1733 sizeof(srp_cmd->lun));
1734 rc = target_submit_cmd(cmd, ch->sess, srp_cmd->cdb, 1734 rc = target_submit_cmd(cmd, ch->sess, srp_cmd->cdb,
1735 &send_ioctx->sense_data[0], unpacked_lun, data_len, 1735 &send_ioctx->sense_data[0], unpacked_lun, data_len,
1736 MSG_SIMPLE_TAG, dir, TARGET_SCF_ACK_KREF); 1736 TCM_SIMPLE_TAG, dir, TARGET_SCF_ACK_KREF);
1737 if (rc != 0) { 1737 if (rc != 0) {
1738 ret = TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE; 1738 ret = TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE;
1739 goto send_sense; 1739 goto send_sense;
diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c
index 6719a3390ebd..2c5ce48c8f95 100644
--- a/drivers/scsi/advansys.c
+++ b/drivers/scsi/advansys.c
@@ -7921,9 +7921,9 @@ static int asc_build_req(struct asc_board *boardp, struct scsi_cmnd *scp,
7921 */ 7921 */
7922 if ((asc_dvc->cur_dvc_qng[scp->device->id] > 0) && 7922 if ((asc_dvc->cur_dvc_qng[scp->device->id] > 0) &&
7923 (boardp->reqcnt[scp->device->id] % 255) == 0) { 7923 (boardp->reqcnt[scp->device->id] % 255) == 0) {
7924 asc_scsi_q->q2.tag_code = MSG_ORDERED_TAG; 7924 asc_scsi_q->q2.tag_code = ORDERED_QUEUE_TAG;
7925 } else { 7925 } else {
7926 asc_scsi_q->q2.tag_code = MSG_SIMPLE_TAG; 7926 asc_scsi_q->q2.tag_code = SIMPLE_QUEUE_TAG;
7927 } 7927 }
7928 7928
7929 /* Build ASC_SCSI_Q */ 7929 /* Build ASC_SCSI_Q */
@@ -8351,7 +8351,7 @@ static int AscPutReadyQueue(ASC_DVC_VAR *asc_dvc, ASC_SCSI_Q *scsiq, uchar q_no)
8351 } 8351 }
8352 q_addr = ASC_QNO_TO_QADDR(q_no); 8352 q_addr = ASC_QNO_TO_QADDR(q_no);
8353 if ((scsiq->q1.target_id & asc_dvc->use_tagged_qng) == 0) { 8353 if ((scsiq->q1.target_id & asc_dvc->use_tagged_qng) == 0) {
8354 scsiq->q2.tag_code &= ~MSG_SIMPLE_TAG; 8354 scsiq->q2.tag_code &= ~SIMPLE_QUEUE_TAG;
8355 } 8355 }
8356 scsiq->q1.status = QS_FREE; 8356 scsiq->q1.status = QS_FREE;
8357 AscMemWordCopyPtrToLram(iop_base, 8357 AscMemWordCopyPtrToLram(iop_base,
@@ -8669,7 +8669,7 @@ static int AscExeScsiQueue(ASC_DVC_VAR *asc_dvc, ASC_SCSI_Q *scsiq)
8669 } 8669 }
8670 } 8670 }
8671 if (disable_syn_offset_one_fix) { 8671 if (disable_syn_offset_one_fix) {
8672 scsiq->q2.tag_code &= ~MSG_SIMPLE_TAG; 8672 scsiq->q2.tag_code &= ~SIMPLE_QUEUE_TAG;
8673 scsiq->q2.tag_code |= (ASC_TAG_FLAG_DISABLE_ASYN_USE_SYN_FIX | 8673 scsiq->q2.tag_code |= (ASC_TAG_FLAG_DISABLE_ASYN_USE_SYN_FIX |
8674 ASC_TAG_FLAG_DISABLE_DISCONNECT); 8674 ASC_TAG_FLAG_DISABLE_DISCONNECT);
8675 } else { 8675 } else {
diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c
index a902fa1db7af..57418258c101 100644
--- a/drivers/scsi/qla2xxx/qla_target.c
+++ b/drivers/scsi/qla2xxx/qla_target.c
@@ -3218,25 +3218,25 @@ static inline int qlt_get_fcp_task_attr(struct scsi_qla_host *vha,
3218 3218
3219 switch (task_codes) { 3219 switch (task_codes) {
3220 case ATIO_SIMPLE_QUEUE: 3220 case ATIO_SIMPLE_QUEUE:
3221 fcp_task_attr = MSG_SIMPLE_TAG; 3221 fcp_task_attr = TCM_SIMPLE_TAG;
3222 break; 3222 break;
3223 case ATIO_HEAD_OF_QUEUE: 3223 case ATIO_HEAD_OF_QUEUE:
3224 fcp_task_attr = MSG_HEAD_TAG; 3224 fcp_task_attr = TCM_HEAD_TAG;
3225 break; 3225 break;
3226 case ATIO_ORDERED_QUEUE: 3226 case ATIO_ORDERED_QUEUE:
3227 fcp_task_attr = MSG_ORDERED_TAG; 3227 fcp_task_attr = TCM_ORDERED_TAG;
3228 break; 3228 break;
3229 case ATIO_ACA_QUEUE: 3229 case ATIO_ACA_QUEUE:
3230 fcp_task_attr = MSG_ACA_TAG; 3230 fcp_task_attr = TCM_ACA_TAG;
3231 break; 3231 break;
3232 case ATIO_UNTAGGED: 3232 case ATIO_UNTAGGED:
3233 fcp_task_attr = MSG_SIMPLE_TAG; 3233 fcp_task_attr = TCM_SIMPLE_TAG;
3234 break; 3234 break;
3235 default: 3235 default:
3236 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf05d, 3236 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf05d,
3237 "qla_target: unknown task code %x, use ORDERED instead\n", 3237 "qla_target: unknown task code %x, use ORDERED instead\n",
3238 task_codes); 3238 task_codes);
3239 fcp_task_attr = MSG_ORDERED_TAG; 3239 fcp_task_attr = TCM_ORDERED_TAG;
3240 break; 3240 break;
3241 } 3241 }
3242 3242
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
index 87b5361d893b..d81158b71326 100644
--- a/drivers/scsi/scsi_debug.c
+++ b/drivers/scsi/scsi_debug.c
@@ -128,7 +128,6 @@ static const char *scsi_debug_version_date = "20141022";
128#define DEF_REMOVABLE false 128#define DEF_REMOVABLE false
129#define DEF_SCSI_LEVEL 6 /* INQUIRY, byte2 [6->SPC-4] */ 129#define DEF_SCSI_LEVEL 6 /* INQUIRY, byte2 [6->SPC-4] */
130#define DEF_SECTOR_SIZE 512 130#define DEF_SECTOR_SIZE 512
131#define DEF_TAGGED_QUEUING 0 /* 0 | MSG_SIMPLE_TAG | MSG_ORDERED_TAG */
132#define DEF_UNMAP_ALIGNMENT 0 131#define DEF_UNMAP_ALIGNMENT 0
133#define DEF_UNMAP_GRANULARITY 1 132#define DEF_UNMAP_GRANULARITY 1
134#define DEF_UNMAP_MAX_BLOCKS 0xFFFFFFFF 133#define DEF_UNMAP_MAX_BLOCKS 0xFFFFFFFF
diff --git a/drivers/scsi/scsi_transport_spi.c b/drivers/scsi/scsi_transport_spi.c
index fa2aece76cc2..31bbb0da3397 100644
--- a/drivers/scsi/scsi_transport_spi.c
+++ b/drivers/scsi/scsi_transport_spi.c
@@ -1221,7 +1221,7 @@ EXPORT_SYMBOL_GPL(spi_populate_ppr_msg);
1221int spi_populate_tag_msg(unsigned char *msg, struct scsi_cmnd *cmd) 1221int spi_populate_tag_msg(unsigned char *msg, struct scsi_cmnd *cmd)
1222{ 1222{
1223 if (cmd->flags & SCMD_TAGGED) { 1223 if (cmd->flags & SCMD_TAGGED) {
1224 *msg++ = MSG_SIMPLE_TAG; 1224 *msg++ = SIMPLE_QUEUE_TAG;
1225 *msg++ = cmd->request->tag; 1225 *msg++ = cmd->request->tag;
1226 return 2; 1226 return 2;
1227 } 1227 }
diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c
index b19e4329ba00..67802ccfcde9 100644
--- a/drivers/target/iscsi/iscsi_target.c
+++ b/drivers/target/iscsi/iscsi_target.c
@@ -943,17 +943,17 @@ int iscsit_setup_scsi_cmd(struct iscsi_conn *conn, struct iscsi_cmd *cmd,
943 */ 943 */
944 if ((iscsi_task_attr == ISCSI_ATTR_UNTAGGED) || 944 if ((iscsi_task_attr == ISCSI_ATTR_UNTAGGED) ||
945 (iscsi_task_attr == ISCSI_ATTR_SIMPLE)) 945 (iscsi_task_attr == ISCSI_ATTR_SIMPLE))
946 sam_task_attr = MSG_SIMPLE_TAG; 946 sam_task_attr = TCM_SIMPLE_TAG;
947 else if (iscsi_task_attr == ISCSI_ATTR_ORDERED) 947 else if (iscsi_task_attr == ISCSI_ATTR_ORDERED)
948 sam_task_attr = MSG_ORDERED_TAG; 948 sam_task_attr = TCM_ORDERED_TAG;
949 else if (iscsi_task_attr == ISCSI_ATTR_HEAD_OF_QUEUE) 949 else if (iscsi_task_attr == ISCSI_ATTR_HEAD_OF_QUEUE)
950 sam_task_attr = MSG_HEAD_TAG; 950 sam_task_attr = TCM_HEAD_TAG;
951 else if (iscsi_task_attr == ISCSI_ATTR_ACA) 951 else if (iscsi_task_attr == ISCSI_ATTR_ACA)
952 sam_task_attr = MSG_ACA_TAG; 952 sam_task_attr = TCM_ACA_TAG;
953 else { 953 else {
954 pr_debug("Unknown iSCSI Task Attribute: 0x%02x, using" 954 pr_debug("Unknown iSCSI Task Attribute: 0x%02x, using"
955 " MSG_SIMPLE_TAG\n", iscsi_task_attr); 955 " TCM_SIMPLE_TAG\n", iscsi_task_attr);
956 sam_task_attr = MSG_SIMPLE_TAG; 956 sam_task_attr = TCM_SIMPLE_TAG;
957 } 957 }
958 958
959 cmd->iscsi_opcode = ISCSI_OP_SCSI_CMD; 959 cmd->iscsi_opcode = ISCSI_OP_SCSI_CMD;
@@ -1811,7 +1811,7 @@ iscsit_handle_task_mgt_cmd(struct iscsi_conn *conn, struct iscsi_cmd *cmd,
1811 transport_init_se_cmd(&cmd->se_cmd, 1811 transport_init_se_cmd(&cmd->se_cmd,
1812 &lio_target_fabric_configfs->tf_ops, 1812 &lio_target_fabric_configfs->tf_ops,
1813 conn->sess->se_sess, 0, DMA_NONE, 1813 conn->sess->se_sess, 0, DMA_NONE,
1814 MSG_SIMPLE_TAG, cmd->sense_buffer + 2); 1814 TCM_SIMPLE_TAG, cmd->sense_buffer + 2);
1815 1815
1816 target_get_sess_cmd(conn->sess->se_sess, &cmd->se_cmd, true); 1816 target_get_sess_cmd(conn->sess->se_sess, &cmd->se_cmd, true);
1817 sess_ref = true; 1817 sess_ref = true;
diff --git a/drivers/target/loopback/tcm_loop.c b/drivers/target/loopback/tcm_loop.c
index 24e2c94e429b..dda9a08c939f 100644
--- a/drivers/target/loopback/tcm_loop.c
+++ b/drivers/target/loopback/tcm_loop.c
@@ -168,7 +168,7 @@ static void tcm_loop_submission_work(struct work_struct *work)
168 168
169 rc = target_submit_cmd_map_sgls(se_cmd, tl_nexus->se_sess, sc->cmnd, 169 rc = target_submit_cmd_map_sgls(se_cmd, tl_nexus->se_sess, sc->cmnd,
170 &tl_cmd->tl_sense_buf[0], tl_cmd->sc->device->lun, 170 &tl_cmd->tl_sense_buf[0], tl_cmd->sc->device->lun,
171 transfer_length, MSG_SIMPLE_TAG, 171 transfer_length, TCM_SIMPLE_TAG,
172 sc->sc_data_direction, 0, 172 sc->sc_data_direction, 0,
173 scsi_sglist(sc), scsi_sg_count(sc), 173 scsi_sglist(sc), scsi_sg_count(sc),
174 sgl_bidi, sgl_bidi_count, 174 sgl_bidi, sgl_bidi_count,
@@ -248,7 +248,7 @@ static int tcm_loop_issue_tmr(struct tcm_loop_tpg *tl_tpg,
248 * Initialize struct se_cmd descriptor from target_core_mod infrastructure 248 * Initialize struct se_cmd descriptor from target_core_mod infrastructure
249 */ 249 */
250 transport_init_se_cmd(se_cmd, se_tpg->se_tpg_tfo, se_sess, 0, 250 transport_init_se_cmd(se_cmd, se_tpg->se_tpg_tfo, se_sess, 0,
251 DMA_NONE, MSG_SIMPLE_TAG, 251 DMA_NONE, TCM_SIMPLE_TAG,
252 &tl_cmd->tl_sense_buf[0]); 252 &tl_cmd->tl_sense_buf[0]);
253 253
254 rc = core_tmr_alloc_req(se_cmd, tl_tmr, tmr, GFP_KERNEL); 254 rc = core_tmr_alloc_req(se_cmd, tl_tmr, tmr, GFP_KERNEL);
diff --git a/drivers/target/sbp/sbp_target.c b/drivers/target/sbp/sbp_target.c
index e7e93727553c..9512af6a8114 100644
--- a/drivers/target/sbp/sbp_target.c
+++ b/drivers/target/sbp/sbp_target.c
@@ -1237,7 +1237,7 @@ static void sbp_handle_command(struct sbp_target_request *req)
1237 1237
1238 if (target_submit_cmd(&req->se_cmd, sess->se_sess, req->cmd_buf, 1238 if (target_submit_cmd(&req->se_cmd, sess->se_sess, req->cmd_buf,
1239 req->sense_buf, unpacked_lun, data_length, 1239 req->sense_buf, unpacked_lun, data_length,
1240 MSG_SIMPLE_TAG, data_dir, 0)) 1240 TCM_SIMPLE_TAG, data_dir, 0))
1241 goto err; 1241 goto err;
1242 1242
1243 return; 1243 return;
diff --git a/drivers/target/target_core_pscsi.c b/drivers/target/target_core_pscsi.c
index 7c8291f0bbbc..caf03d5b3ca2 100644
--- a/drivers/target/target_core_pscsi.c
+++ b/drivers/target/target_core_pscsi.c
@@ -1094,7 +1094,7 @@ pscsi_execute_cmd(struct se_cmd *cmd)
1094 req->retries = PS_RETRY; 1094 req->retries = PS_RETRY;
1095 1095
1096 blk_execute_rq_nowait(pdv->pdv_sd->request_queue, NULL, req, 1096 blk_execute_rq_nowait(pdv->pdv_sd->request_queue, NULL, req,
1097 (cmd->sam_task_attr == MSG_HEAD_TAG), 1097 (cmd->sam_task_attr == TCM_HEAD_TAG),
1098 pscsi_req_done); 1098 pscsi_req_done);
1099 1099
1100 return 0; 1100 return 0;
diff --git a/drivers/target/target_core_sbc.c b/drivers/target/target_core_sbc.c
index ebe62afb957d..d6e06af696ed 100644
--- a/drivers/target/target_core_sbc.c
+++ b/drivers/target/target_core_sbc.c
@@ -485,7 +485,7 @@ static sense_reason_t compare_and_write_callback(struct se_cmd *cmd)
485 cmd->t_data_nents_orig = cmd->t_data_nents; 485 cmd->t_data_nents_orig = cmd->t_data_nents;
486 cmd->t_data_nents = 1; 486 cmd->t_data_nents = 1;
487 487
488 cmd->sam_task_attr = MSG_HEAD_TAG; 488 cmd->sam_task_attr = TCM_HEAD_TAG;
489 cmd->transport_complete_callback = compare_and_write_post; 489 cmd->transport_complete_callback = compare_and_write_post;
490 /* 490 /*
491 * Now reset ->execute_cmd() to the normal sbc_execute_rw() handler 491 * Now reset ->execute_cmd() to the normal sbc_execute_rw() handler
diff --git a/drivers/target/target_core_spc.c b/drivers/target/target_core_spc.c
index bc286a67af7c..1307600fe726 100644
--- a/drivers/target/target_core_spc.c
+++ b/drivers/target/target_core_spc.c
@@ -1357,7 +1357,7 @@ spc_parse_cdb(struct se_cmd *cmd, unsigned int *size)
1357 * Do implicit HEAD_OF_QUEUE processing for INQUIRY. 1357 * Do implicit HEAD_OF_QUEUE processing for INQUIRY.
1358 * See spc4r17 section 5.3 1358 * See spc4r17 section 5.3
1359 */ 1359 */
1360 cmd->sam_task_attr = MSG_HEAD_TAG; 1360 cmd->sam_task_attr = TCM_HEAD_TAG;
1361 cmd->execute_cmd = spc_emulate_inquiry; 1361 cmd->execute_cmd = spc_emulate_inquiry;
1362 break; 1362 break;
1363 case SECURITY_PROTOCOL_IN: 1363 case SECURITY_PROTOCOL_IN:
@@ -1391,7 +1391,7 @@ spc_parse_cdb(struct se_cmd *cmd, unsigned int *size)
1391 * Do implicit HEAD_OF_QUEUE processing for REPORT_LUNS 1391 * Do implicit HEAD_OF_QUEUE processing for REPORT_LUNS
1392 * See spc4r17 section 5.3 1392 * See spc4r17 section 5.3
1393 */ 1393 */
1394 cmd->sam_task_attr = MSG_HEAD_TAG; 1394 cmd->sam_task_attr = TCM_HEAD_TAG;
1395 break; 1395 break;
1396 case TEST_UNIT_READY: 1396 case TEST_UNIT_READY:
1397 cmd->execute_cmd = spc_emulate_testunitready; 1397 cmd->execute_cmd = spc_emulate_testunitready;
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
index 9ea0d5f03f7a..d9b5010c3bf7 100644
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -1159,7 +1159,7 @@ transport_check_alloc_task_attr(struct se_cmd *cmd)
1159 if (dev->transport->transport_type == TRANSPORT_PLUGIN_PHBA_PDEV) 1159 if (dev->transport->transport_type == TRANSPORT_PLUGIN_PHBA_PDEV)
1160 return 0; 1160 return 0;
1161 1161
1162 if (cmd->sam_task_attr == MSG_ACA_TAG) { 1162 if (cmd->sam_task_attr == TCM_ACA_TAG) {
1163 pr_debug("SAM Task Attribute ACA" 1163 pr_debug("SAM Task Attribute ACA"
1164 " emulation is not supported\n"); 1164 " emulation is not supported\n");
1165 return TCM_INVALID_CDB_FIELD; 1165 return TCM_INVALID_CDB_FIELD;
@@ -1531,7 +1531,7 @@ int target_submit_tmr(struct se_cmd *se_cmd, struct se_session *se_sess,
1531 BUG_ON(!se_tpg); 1531 BUG_ON(!se_tpg);
1532 1532
1533 transport_init_se_cmd(se_cmd, se_tpg->se_tpg_tfo, se_sess, 1533 transport_init_se_cmd(se_cmd, se_tpg->se_tpg_tfo, se_sess,
1534 0, DMA_NONE, MSG_SIMPLE_TAG, sense); 1534 0, DMA_NONE, TCM_SIMPLE_TAG, sense);
1535 /* 1535 /*
1536 * FIXME: Currently expect caller to handle se_cmd->se_tmr_req 1536 * FIXME: Currently expect caller to handle se_cmd->se_tmr_req
1537 * allocation failure. 1537 * allocation failure.
@@ -1718,12 +1718,12 @@ static bool target_handle_task_attr(struct se_cmd *cmd)
1718 * to allow the passed struct se_cmd list of tasks to the front of the list. 1718 * to allow the passed struct se_cmd list of tasks to the front of the list.
1719 */ 1719 */
1720 switch (cmd->sam_task_attr) { 1720 switch (cmd->sam_task_attr) {
1721 case MSG_HEAD_TAG: 1721 case TCM_HEAD_TAG:
1722 pr_debug("Added HEAD_OF_QUEUE for CDB: 0x%02x, " 1722 pr_debug("Added HEAD_OF_QUEUE for CDB: 0x%02x, "
1723 "se_ordered_id: %u\n", 1723 "se_ordered_id: %u\n",
1724 cmd->t_task_cdb[0], cmd->se_ordered_id); 1724 cmd->t_task_cdb[0], cmd->se_ordered_id);
1725 return false; 1725 return false;
1726 case MSG_ORDERED_TAG: 1726 case TCM_ORDERED_TAG:
1727 atomic_inc_mb(&dev->dev_ordered_sync); 1727 atomic_inc_mb(&dev->dev_ordered_sync);
1728 1728
1729 pr_debug("Added ORDERED for CDB: 0x%02x to ordered list, " 1729 pr_debug("Added ORDERED for CDB: 0x%02x to ordered list, "
@@ -1828,7 +1828,7 @@ static void target_restart_delayed_cmds(struct se_device *dev)
1828 1828
1829 __target_execute_cmd(cmd); 1829 __target_execute_cmd(cmd);
1830 1830
1831 if (cmd->sam_task_attr == MSG_ORDERED_TAG) 1831 if (cmd->sam_task_attr == TCM_ORDERED_TAG)
1832 break; 1832 break;
1833 } 1833 }
1834} 1834}
@@ -1844,18 +1844,18 @@ static void transport_complete_task_attr(struct se_cmd *cmd)
1844 if (dev->transport->transport_type == TRANSPORT_PLUGIN_PHBA_PDEV) 1844 if (dev->transport->transport_type == TRANSPORT_PLUGIN_PHBA_PDEV)
1845 return; 1845 return;
1846 1846
1847 if (cmd->sam_task_attr == MSG_SIMPLE_TAG) { 1847 if (cmd->sam_task_attr == TCM_SIMPLE_TAG) {
1848 atomic_dec_mb(&dev->simple_cmds); 1848 atomic_dec_mb(&dev->simple_cmds);
1849 dev->dev_cur_ordered_id++; 1849 dev->dev_cur_ordered_id++;
1850 pr_debug("Incremented dev->dev_cur_ordered_id: %u for" 1850 pr_debug("Incremented dev->dev_cur_ordered_id: %u for"
1851 " SIMPLE: %u\n", dev->dev_cur_ordered_id, 1851 " SIMPLE: %u\n", dev->dev_cur_ordered_id,
1852 cmd->se_ordered_id); 1852 cmd->se_ordered_id);
1853 } else if (cmd->sam_task_attr == MSG_HEAD_TAG) { 1853 } else if (cmd->sam_task_attr == TCM_HEAD_TAG) {
1854 dev->dev_cur_ordered_id++; 1854 dev->dev_cur_ordered_id++;
1855 pr_debug("Incremented dev_cur_ordered_id: %u for" 1855 pr_debug("Incremented dev_cur_ordered_id: %u for"
1856 " HEAD_OF_QUEUE: %u\n", dev->dev_cur_ordered_id, 1856 " HEAD_OF_QUEUE: %u\n", dev->dev_cur_ordered_id,
1857 cmd->se_ordered_id); 1857 cmd->se_ordered_id);
1858 } else if (cmd->sam_task_attr == MSG_ORDERED_TAG) { 1858 } else if (cmd->sam_task_attr == TCM_ORDERED_TAG) {
1859 atomic_dec_mb(&dev->dev_ordered_sync); 1859 atomic_dec_mb(&dev->dev_ordered_sync);
1860 1860
1861 dev->dev_cur_ordered_id++; 1861 dev->dev_cur_ordered_id++;
diff --git a/drivers/target/tcm_fc/tfc_cmd.c b/drivers/target/tcm_fc/tfc_cmd.c
index be0c0d08c56a..edcafa4490c0 100644
--- a/drivers/target/tcm_fc/tfc_cmd.c
+++ b/drivers/target/tcm_fc/tfc_cmd.c
@@ -554,17 +554,17 @@ static void ft_send_work(struct work_struct *work)
554 */ 554 */
555 switch (fcp->fc_pri_ta & FCP_PTA_MASK) { 555 switch (fcp->fc_pri_ta & FCP_PTA_MASK) {
556 case FCP_PTA_HEADQ: 556 case FCP_PTA_HEADQ:
557 task_attr = MSG_HEAD_TAG; 557 task_attr = TCM_HEAD_TAG;
558 break; 558 break;
559 case FCP_PTA_ORDERED: 559 case FCP_PTA_ORDERED:
560 task_attr = MSG_ORDERED_TAG; 560 task_attr = TCM_ORDERED_TAG;
561 break; 561 break;
562 case FCP_PTA_ACA: 562 case FCP_PTA_ACA:
563 task_attr = MSG_ACA_TAG; 563 task_attr = TCM_ACA_TAG;
564 break; 564 break;
565 case FCP_PTA_SIMPLE: /* Fallthrough */ 565 case FCP_PTA_SIMPLE: /* Fallthrough */
566 default: 566 default:
567 task_attr = MSG_SIMPLE_TAG; 567 task_attr = TCM_SIMPLE_TAG;
568 } 568 }
569 569
570 fc_seq_exch(cmd->seq)->lp->tt.seq_set_resp(cmd->seq, ft_recv_seq, cmd); 570 fc_seq_exch(cmd->seq)->lp->tt.seq_set_resp(cmd->seq, ft_recv_seq, cmd);
diff --git a/drivers/usb/gadget/legacy/tcm_usb_gadget.c b/drivers/usb/gadget/legacy/tcm_usb_gadget.c
index 6cdb7a534f23..283ee14ca0fd 100644
--- a/drivers/usb/gadget/legacy/tcm_usb_gadget.c
+++ b/drivers/usb/gadget/legacy/tcm_usb_gadget.c
@@ -1131,19 +1131,19 @@ static int usbg_submit_command(struct f_uas *fu,
1131 1131
1132 switch (cmd_iu->prio_attr & 0x7) { 1132 switch (cmd_iu->prio_attr & 0x7) {
1133 case UAS_HEAD_TAG: 1133 case UAS_HEAD_TAG:
1134 cmd->prio_attr = MSG_HEAD_TAG; 1134 cmd->prio_attr = TCM_HEAD_TAG;
1135 break; 1135 break;
1136 case UAS_ORDERED_TAG: 1136 case UAS_ORDERED_TAG:
1137 cmd->prio_attr = MSG_ORDERED_TAG; 1137 cmd->prio_attr = TCM_ORDERED_TAG;
1138 break; 1138 break;
1139 case UAS_ACA: 1139 case UAS_ACA:
1140 cmd->prio_attr = MSG_ACA_TAG; 1140 cmd->prio_attr = TCM_ACA_TAG;
1141 break; 1141 break;
1142 default: 1142 default:
1143 pr_debug_once("Unsupported prio_attr: %02x.\n", 1143 pr_debug_once("Unsupported prio_attr: %02x.\n",
1144 cmd_iu->prio_attr); 1144 cmd_iu->prio_attr);
1145 case UAS_SIMPLE_TAG: 1145 case UAS_SIMPLE_TAG:
1146 cmd->prio_attr = MSG_SIMPLE_TAG; 1146 cmd->prio_attr = TCM_SIMPLE_TAG;
1147 break; 1147 break;
1148 } 1148 }
1149 1149
@@ -1240,7 +1240,7 @@ static int bot_submit_command(struct f_uas *fu,
1240 goto err; 1240 goto err;
1241 } 1241 }
1242 1242
1243 cmd->prio_attr = MSG_SIMPLE_TAG; 1243 cmd->prio_attr = TCM_SIMPLE_TAG;
1244 se_cmd = &cmd->se_cmd; 1244 se_cmd = &cmd->se_cmd;
1245 cmd->unpacked_lun = cbw->Lun; 1245 cmd->unpacked_lun = cbw->Lun;
1246 cmd->is_read = cbw->Flags & US_BULK_FLAG_IN ? 1 : 0; 1246 cmd->is_read = cbw->Flags & US_BULK_FLAG_IN ? 1 : 0;
diff --git a/drivers/xen/xen-scsiback.c b/drivers/xen/xen-scsiback.c
index 50610a6acf3d..e999496eda3e 100644
--- a/drivers/xen/xen-scsiback.c
+++ b/drivers/xen/xen-scsiback.c
@@ -606,7 +606,7 @@ static void scsiback_device_action(struct vscsibk_pend *pending_req,
606 init_waitqueue_head(&tmr->tmr_wait); 606 init_waitqueue_head(&tmr->tmr_wait);
607 607
608 transport_init_se_cmd(se_cmd, tpg->se_tpg.se_tpg_tfo, 608 transport_init_se_cmd(se_cmd, tpg->se_tpg.se_tpg_tfo,
609 tpg->tpg_nexus->tvn_se_sess, 0, DMA_NONE, MSG_SIMPLE_TAG, 609 tpg->tpg_nexus->tvn_se_sess, 0, DMA_NONE, TCM_SIMPLE_TAG,
610 &pending_req->sense_buffer[0]); 610 &pending_req->sense_buffer[0]);
611 611
612 rc = core_tmr_alloc_req(se_cmd, tmr, act, GFP_KERNEL); 612 rc = core_tmr_alloc_req(se_cmd, tmr, act, GFP_KERNEL);