Skip to content

Commit 68d81f4

Browse files
Christoph HellwigChristoph Hellwig
authored andcommitted
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 <[email protected]> Reviewed-by: Bart Van Assche <[email protected]> Reviewed-by: Martin K. Petersen <[email protected]
1 parent 4e48489 commit 68d81f4

File tree

18 files changed

+58
-58
lines changed

18 files changed

+58
-58
lines changed

drivers/infiniband/ulp/srpt/ib_srpt.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1708,17 +1708,17 @@ static int srpt_handle_cmd(struct srpt_rdma_ch *ch,
17081708

17091709
switch (srp_cmd->task_attr) {
17101710
case SRP_CMD_SIMPLE_Q:
1711-
cmd->sam_task_attr = MSG_SIMPLE_TAG;
1711+
cmd->sam_task_attr = TCM_SIMPLE_TAG;
17121712
break;
17131713
case SRP_CMD_ORDERED_Q:
17141714
default:
1715-
cmd->sam_task_attr = MSG_ORDERED_TAG;
1715+
cmd->sam_task_attr = TCM_ORDERED_TAG;
17161716
break;
17171717
case SRP_CMD_HEAD_OF_Q:
1718-
cmd->sam_task_attr = MSG_HEAD_TAG;
1718+
cmd->sam_task_attr = TCM_HEAD_TAG;
17191719
break;
17201720
case SRP_CMD_ACA:
1721-
cmd->sam_task_attr = MSG_ACA_TAG;
1721+
cmd->sam_task_attr = TCM_ACA_TAG;
17221722
break;
17231723
}
17241724

@@ -1733,7 +1733,7 @@ static int srpt_handle_cmd(struct srpt_rdma_ch *ch,
17331733
sizeof(srp_cmd->lun));
17341734
rc = target_submit_cmd(cmd, ch->sess, srp_cmd->cdb,
17351735
&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);
17371737
if (rc != 0) {
17381738
ret = TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE;
17391739
goto send_sense;

drivers/scsi/advansys.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7921,9 +7921,9 @@ static int asc_build_req(struct asc_board *boardp, struct scsi_cmnd *scp,
79217921
*/
79227922
if ((asc_dvc->cur_dvc_qng[scp->device->id] > 0) &&
79237923
(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;
79257925
} else {
7926-
asc_scsi_q->q2.tag_code = MSG_SIMPLE_TAG;
7926+
asc_scsi_q->q2.tag_code = SIMPLE_QUEUE_TAG;
79277927
}
79287928

79297929
/* Build ASC_SCSI_Q */
@@ -8351,7 +8351,7 @@ static int AscPutReadyQueue(ASC_DVC_VAR *asc_dvc, ASC_SCSI_Q *scsiq, uchar q_no)
83518351
}
83528352
q_addr = ASC_QNO_TO_QADDR(q_no);
83538353
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;
83558355
}
83568356
scsiq->q1.status = QS_FREE;
83578357
AscMemWordCopyPtrToLram(iop_base,
@@ -8669,7 +8669,7 @@ static int AscExeScsiQueue(ASC_DVC_VAR *asc_dvc, ASC_SCSI_Q *scsiq)
86698669
}
86708670
}
86718671
if (disable_syn_offset_one_fix) {
8672-
scsiq->q2.tag_code &= ~MSG_SIMPLE_TAG;
8672+
scsiq->q2.tag_code &= ~SIMPLE_QUEUE_TAG;
86738673
scsiq->q2.tag_code |= (ASC_TAG_FLAG_DISABLE_ASYN_USE_SYN_FIX |
86748674
ASC_TAG_FLAG_DISABLE_DISCONNECT);
86758675
} else {

drivers/scsi/qla2xxx/qla_target.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3218,25 +3218,25 @@ static inline int qlt_get_fcp_task_attr(struct scsi_qla_host *vha,
32183218

32193219
switch (task_codes) {
32203220
case ATIO_SIMPLE_QUEUE:
3221-
fcp_task_attr = MSG_SIMPLE_TAG;
3221+
fcp_task_attr = TCM_SIMPLE_TAG;
32223222
break;
32233223
case ATIO_HEAD_OF_QUEUE:
3224-
fcp_task_attr = MSG_HEAD_TAG;
3224+
fcp_task_attr = TCM_HEAD_TAG;
32253225
break;
32263226
case ATIO_ORDERED_QUEUE:
3227-
fcp_task_attr = MSG_ORDERED_TAG;
3227+
fcp_task_attr = TCM_ORDERED_TAG;
32283228
break;
32293229
case ATIO_ACA_QUEUE:
3230-
fcp_task_attr = MSG_ACA_TAG;
3230+
fcp_task_attr = TCM_ACA_TAG;
32313231
break;
32323232
case ATIO_UNTAGGED:
3233-
fcp_task_attr = MSG_SIMPLE_TAG;
3233+
fcp_task_attr = TCM_SIMPLE_TAG;
32343234
break;
32353235
default:
32363236
ql_dbg(ql_dbg_tgt_mgt, vha, 0xf05d,
32373237
"qla_target: unknown task code %x, use ORDERED instead\n",
32383238
task_codes);
3239-
fcp_task_attr = MSG_ORDERED_TAG;
3239+
fcp_task_attr = TCM_ORDERED_TAG;
32403240
break;
32413241
}
32423242

drivers/scsi/scsi_debug.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ static const char *scsi_debug_version_date = "20141022";
128128
#define DEF_REMOVABLE false
129129
#define DEF_SCSI_LEVEL 6 /* INQUIRY, byte2 [6->SPC-4] */
130130
#define DEF_SECTOR_SIZE 512
131-
#define DEF_TAGGED_QUEUING 0 /* 0 | MSG_SIMPLE_TAG | MSG_ORDERED_TAG */
132131
#define DEF_UNMAP_ALIGNMENT 0
133132
#define DEF_UNMAP_GRANULARITY 1
134133
#define DEF_UNMAP_MAX_BLOCKS 0xFFFFFFFF

drivers/scsi/scsi_transport_spi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1221,7 +1221,7 @@ EXPORT_SYMBOL_GPL(spi_populate_ppr_msg);
12211221
int spi_populate_tag_msg(unsigned char *msg, struct scsi_cmnd *cmd)
12221222
{
12231223
if (cmd->flags & SCMD_TAGGED) {
1224-
*msg++ = MSG_SIMPLE_TAG;
1224+
*msg++ = SIMPLE_QUEUE_TAG;
12251225
*msg++ = cmd->request->tag;
12261226
return 2;
12271227
}

drivers/target/iscsi/iscsi_target.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -943,17 +943,17 @@ int iscsit_setup_scsi_cmd(struct iscsi_conn *conn, struct iscsi_cmd *cmd,
943943
*/
944944
if ((iscsi_task_attr == ISCSI_ATTR_UNTAGGED) ||
945945
(iscsi_task_attr == ISCSI_ATTR_SIMPLE))
946-
sam_task_attr = MSG_SIMPLE_TAG;
946+
sam_task_attr = TCM_SIMPLE_TAG;
947947
else if (iscsi_task_attr == ISCSI_ATTR_ORDERED)
948-
sam_task_attr = MSG_ORDERED_TAG;
948+
sam_task_attr = TCM_ORDERED_TAG;
949949
else if (iscsi_task_attr == ISCSI_ATTR_HEAD_OF_QUEUE)
950-
sam_task_attr = MSG_HEAD_TAG;
950+
sam_task_attr = TCM_HEAD_TAG;
951951
else if (iscsi_task_attr == ISCSI_ATTR_ACA)
952-
sam_task_attr = MSG_ACA_TAG;
952+
sam_task_attr = TCM_ACA_TAG;
953953
else {
954954
pr_debug("Unknown iSCSI Task Attribute: 0x%02x, using"
955-
" MSG_SIMPLE_TAG\n", iscsi_task_attr);
956-
sam_task_attr = MSG_SIMPLE_TAG;
955+
" TCM_SIMPLE_TAG\n", iscsi_task_attr);
956+
sam_task_attr = TCM_SIMPLE_TAG;
957957
}
958958

959959
cmd->iscsi_opcode = ISCSI_OP_SCSI_CMD;
@@ -1811,7 +1811,7 @@ iscsit_handle_task_mgt_cmd(struct iscsi_conn *conn, struct iscsi_cmd *cmd,
18111811
transport_init_se_cmd(&cmd->se_cmd,
18121812
&lio_target_fabric_configfs->tf_ops,
18131813
conn->sess->se_sess, 0, DMA_NONE,
1814-
MSG_SIMPLE_TAG, cmd->sense_buffer + 2);
1814+
TCM_SIMPLE_TAG, cmd->sense_buffer + 2);
18151815

18161816
target_get_sess_cmd(conn->sess->se_sess, &cmd->se_cmd, true);
18171817
sess_ref = true;

drivers/target/loopback/tcm_loop.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ static void tcm_loop_submission_work(struct work_struct *work)
168168

169169
rc = target_submit_cmd_map_sgls(se_cmd, tl_nexus->se_sess, sc->cmnd,
170170
&tl_cmd->tl_sense_buf[0], tl_cmd->sc->device->lun,
171-
transfer_length, MSG_SIMPLE_TAG,
171+
transfer_length, TCM_SIMPLE_TAG,
172172
sc->sc_data_direction, 0,
173173
scsi_sglist(sc), scsi_sg_count(sc),
174174
sgl_bidi, sgl_bidi_count,
@@ -248,7 +248,7 @@ static int tcm_loop_issue_tmr(struct tcm_loop_tpg *tl_tpg,
248248
* Initialize struct se_cmd descriptor from target_core_mod infrastructure
249249
*/
250250
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,
252252
&tl_cmd->tl_sense_buf[0]);
253253

254254
rc = core_tmr_alloc_req(se_cmd, tl_tmr, tmr, GFP_KERNEL);

drivers/target/sbp/sbp_target.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1237,7 +1237,7 @@ static void sbp_handle_command(struct sbp_target_request *req)
12371237

12381238
if (target_submit_cmd(&req->se_cmd, sess->se_sess, req->cmd_buf,
12391239
req->sense_buf, unpacked_lun, data_length,
1240-
MSG_SIMPLE_TAG, data_dir, 0))
1240+
TCM_SIMPLE_TAG, data_dir, 0))
12411241
goto err;
12421242

12431243
return;

drivers/target/target_core_pscsi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1094,7 +1094,7 @@ pscsi_execute_cmd(struct se_cmd *cmd)
10941094
req->retries = PS_RETRY;
10951095

10961096
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),
10981098
pscsi_req_done);
10991099

11001100
return 0;

drivers/target/target_core_sbc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ static sense_reason_t compare_and_write_callback(struct se_cmd *cmd)
485485
cmd->t_data_nents_orig = cmd->t_data_nents;
486486
cmd->t_data_nents = 1;
487487

488-
cmd->sam_task_attr = MSG_HEAD_TAG;
488+
cmd->sam_task_attr = TCM_HEAD_TAG;
489489
cmd->transport_complete_callback = compare_and_write_post;
490490
/*
491491
* Now reset ->execute_cmd() to the normal sbc_execute_rw() handler

0 commit comments

Comments
 (0)