mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
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]
This commit is contained in:
parent
4e484896ac
commit
68d81f4004
18 changed files with 58 additions and 58 deletions
|
|
@ -943,17 +943,17 @@ int iscsit_setup_scsi_cmd(struct iscsi_conn *conn, struct iscsi_cmd *cmd,
|
|||
*/
|
||||
if ((iscsi_task_attr == ISCSI_ATTR_UNTAGGED) ||
|
||||
(iscsi_task_attr == ISCSI_ATTR_SIMPLE))
|
||||
sam_task_attr = MSG_SIMPLE_TAG;
|
||||
sam_task_attr = TCM_SIMPLE_TAG;
|
||||
else if (iscsi_task_attr == ISCSI_ATTR_ORDERED)
|
||||
sam_task_attr = MSG_ORDERED_TAG;
|
||||
sam_task_attr = TCM_ORDERED_TAG;
|
||||
else if (iscsi_task_attr == ISCSI_ATTR_HEAD_OF_QUEUE)
|
||||
sam_task_attr = MSG_HEAD_TAG;
|
||||
sam_task_attr = TCM_HEAD_TAG;
|
||||
else if (iscsi_task_attr == ISCSI_ATTR_ACA)
|
||||
sam_task_attr = MSG_ACA_TAG;
|
||||
sam_task_attr = TCM_ACA_TAG;
|
||||
else {
|
||||
pr_debug("Unknown iSCSI Task Attribute: 0x%02x, using"
|
||||
" MSG_SIMPLE_TAG\n", iscsi_task_attr);
|
||||
sam_task_attr = MSG_SIMPLE_TAG;
|
||||
" TCM_SIMPLE_TAG\n", iscsi_task_attr);
|
||||
sam_task_attr = TCM_SIMPLE_TAG;
|
||||
}
|
||||
|
||||
cmd->iscsi_opcode = ISCSI_OP_SCSI_CMD;
|
||||
|
|
@ -1811,7 +1811,7 @@ iscsit_handle_task_mgt_cmd(struct iscsi_conn *conn, struct iscsi_cmd *cmd,
|
|||
transport_init_se_cmd(&cmd->se_cmd,
|
||||
&lio_target_fabric_configfs->tf_ops,
|
||||
conn->sess->se_sess, 0, DMA_NONE,
|
||||
MSG_SIMPLE_TAG, cmd->sense_buffer + 2);
|
||||
TCM_SIMPLE_TAG, cmd->sense_buffer + 2);
|
||||
|
||||
target_get_sess_cmd(conn->sess->se_sess, &cmd->se_cmd, true);
|
||||
sess_ref = true;
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ static void tcm_loop_submission_work(struct work_struct *work)
|
|||
|
||||
rc = target_submit_cmd_map_sgls(se_cmd, tl_nexus->se_sess, sc->cmnd,
|
||||
&tl_cmd->tl_sense_buf[0], tl_cmd->sc->device->lun,
|
||||
transfer_length, MSG_SIMPLE_TAG,
|
||||
transfer_length, TCM_SIMPLE_TAG,
|
||||
sc->sc_data_direction, 0,
|
||||
scsi_sglist(sc), scsi_sg_count(sc),
|
||||
sgl_bidi, sgl_bidi_count,
|
||||
|
|
@ -248,7 +248,7 @@ static int tcm_loop_issue_tmr(struct tcm_loop_tpg *tl_tpg,
|
|||
* Initialize struct se_cmd descriptor from target_core_mod infrastructure
|
||||
*/
|
||||
transport_init_se_cmd(se_cmd, se_tpg->se_tpg_tfo, se_sess, 0,
|
||||
DMA_NONE, MSG_SIMPLE_TAG,
|
||||
DMA_NONE, TCM_SIMPLE_TAG,
|
||||
&tl_cmd->tl_sense_buf[0]);
|
||||
|
||||
rc = core_tmr_alloc_req(se_cmd, tl_tmr, tmr, GFP_KERNEL);
|
||||
|
|
|
|||
|
|
@ -1237,7 +1237,7 @@ static void sbp_handle_command(struct sbp_target_request *req)
|
|||
|
||||
if (target_submit_cmd(&req->se_cmd, sess->se_sess, req->cmd_buf,
|
||||
req->sense_buf, unpacked_lun, data_length,
|
||||
MSG_SIMPLE_TAG, data_dir, 0))
|
||||
TCM_SIMPLE_TAG, data_dir, 0))
|
||||
goto err;
|
||||
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -1094,7 +1094,7 @@ pscsi_execute_cmd(struct se_cmd *cmd)
|
|||
req->retries = PS_RETRY;
|
||||
|
||||
blk_execute_rq_nowait(pdv->pdv_sd->request_queue, NULL, req,
|
||||
(cmd->sam_task_attr == MSG_HEAD_TAG),
|
||||
(cmd->sam_task_attr == TCM_HEAD_TAG),
|
||||
pscsi_req_done);
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -485,7 +485,7 @@ static sense_reason_t compare_and_write_callback(struct se_cmd *cmd)
|
|||
cmd->t_data_nents_orig = cmd->t_data_nents;
|
||||
cmd->t_data_nents = 1;
|
||||
|
||||
cmd->sam_task_attr = MSG_HEAD_TAG;
|
||||
cmd->sam_task_attr = TCM_HEAD_TAG;
|
||||
cmd->transport_complete_callback = compare_and_write_post;
|
||||
/*
|
||||
* Now reset ->execute_cmd() to the normal sbc_execute_rw() handler
|
||||
|
|
|
|||
|
|
@ -1357,7 +1357,7 @@ spc_parse_cdb(struct se_cmd *cmd, unsigned int *size)
|
|||
* Do implicit HEAD_OF_QUEUE processing for INQUIRY.
|
||||
* See spc4r17 section 5.3
|
||||
*/
|
||||
cmd->sam_task_attr = MSG_HEAD_TAG;
|
||||
cmd->sam_task_attr = TCM_HEAD_TAG;
|
||||
cmd->execute_cmd = spc_emulate_inquiry;
|
||||
break;
|
||||
case SECURITY_PROTOCOL_IN:
|
||||
|
|
@ -1391,7 +1391,7 @@ spc_parse_cdb(struct se_cmd *cmd, unsigned int *size)
|
|||
* Do implicit HEAD_OF_QUEUE processing for REPORT_LUNS
|
||||
* See spc4r17 section 5.3
|
||||
*/
|
||||
cmd->sam_task_attr = MSG_HEAD_TAG;
|
||||
cmd->sam_task_attr = TCM_HEAD_TAG;
|
||||
break;
|
||||
case TEST_UNIT_READY:
|
||||
cmd->execute_cmd = spc_emulate_testunitready;
|
||||
|
|
|
|||
|
|
@ -1159,7 +1159,7 @@ transport_check_alloc_task_attr(struct se_cmd *cmd)
|
|||
if (dev->transport->transport_type == TRANSPORT_PLUGIN_PHBA_PDEV)
|
||||
return 0;
|
||||
|
||||
if (cmd->sam_task_attr == MSG_ACA_TAG) {
|
||||
if (cmd->sam_task_attr == TCM_ACA_TAG) {
|
||||
pr_debug("SAM Task Attribute ACA"
|
||||
" emulation is not supported\n");
|
||||
return TCM_INVALID_CDB_FIELD;
|
||||
|
|
@ -1531,7 +1531,7 @@ int target_submit_tmr(struct se_cmd *se_cmd, struct se_session *se_sess,
|
|||
BUG_ON(!se_tpg);
|
||||
|
||||
transport_init_se_cmd(se_cmd, se_tpg->se_tpg_tfo, se_sess,
|
||||
0, DMA_NONE, MSG_SIMPLE_TAG, sense);
|
||||
0, DMA_NONE, TCM_SIMPLE_TAG, sense);
|
||||
/*
|
||||
* FIXME: Currently expect caller to handle se_cmd->se_tmr_req
|
||||
* allocation failure.
|
||||
|
|
@ -1718,12 +1718,12 @@ static bool target_handle_task_attr(struct se_cmd *cmd)
|
|||
* to allow the passed struct se_cmd list of tasks to the front of the list.
|
||||
*/
|
||||
switch (cmd->sam_task_attr) {
|
||||
case MSG_HEAD_TAG:
|
||||
case TCM_HEAD_TAG:
|
||||
pr_debug("Added HEAD_OF_QUEUE for CDB: 0x%02x, "
|
||||
"se_ordered_id: %u\n",
|
||||
cmd->t_task_cdb[0], cmd->se_ordered_id);
|
||||
return false;
|
||||
case MSG_ORDERED_TAG:
|
||||
case TCM_ORDERED_TAG:
|
||||
atomic_inc_mb(&dev->dev_ordered_sync);
|
||||
|
||||
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)
|
|||
|
||||
__target_execute_cmd(cmd);
|
||||
|
||||
if (cmd->sam_task_attr == MSG_ORDERED_TAG)
|
||||
if (cmd->sam_task_attr == TCM_ORDERED_TAG)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -1844,18 +1844,18 @@ static void transport_complete_task_attr(struct se_cmd *cmd)
|
|||
if (dev->transport->transport_type == TRANSPORT_PLUGIN_PHBA_PDEV)
|
||||
return;
|
||||
|
||||
if (cmd->sam_task_attr == MSG_SIMPLE_TAG) {
|
||||
if (cmd->sam_task_attr == TCM_SIMPLE_TAG) {
|
||||
atomic_dec_mb(&dev->simple_cmds);
|
||||
dev->dev_cur_ordered_id++;
|
||||
pr_debug("Incremented dev->dev_cur_ordered_id: %u for"
|
||||
" SIMPLE: %u\n", dev->dev_cur_ordered_id,
|
||||
cmd->se_ordered_id);
|
||||
} else if (cmd->sam_task_attr == MSG_HEAD_TAG) {
|
||||
} else if (cmd->sam_task_attr == TCM_HEAD_TAG) {
|
||||
dev->dev_cur_ordered_id++;
|
||||
pr_debug("Incremented dev_cur_ordered_id: %u for"
|
||||
" HEAD_OF_QUEUE: %u\n", dev->dev_cur_ordered_id,
|
||||
cmd->se_ordered_id);
|
||||
} else if (cmd->sam_task_attr == MSG_ORDERED_TAG) {
|
||||
} else if (cmd->sam_task_attr == TCM_ORDERED_TAG) {
|
||||
atomic_dec_mb(&dev->dev_ordered_sync);
|
||||
|
||||
dev->dev_cur_ordered_id++;
|
||||
|
|
|
|||
|
|
@ -554,17 +554,17 @@ static void ft_send_work(struct work_struct *work)
|
|||
*/
|
||||
switch (fcp->fc_pri_ta & FCP_PTA_MASK) {
|
||||
case FCP_PTA_HEADQ:
|
||||
task_attr = MSG_HEAD_TAG;
|
||||
task_attr = TCM_HEAD_TAG;
|
||||
break;
|
||||
case FCP_PTA_ORDERED:
|
||||
task_attr = MSG_ORDERED_TAG;
|
||||
task_attr = TCM_ORDERED_TAG;
|
||||
break;
|
||||
case FCP_PTA_ACA:
|
||||
task_attr = MSG_ACA_TAG;
|
||||
task_attr = TCM_ACA_TAG;
|
||||
break;
|
||||
case FCP_PTA_SIMPLE: /* Fallthrough */
|
||||
default:
|
||||
task_attr = MSG_SIMPLE_TAG;
|
||||
task_attr = TCM_SIMPLE_TAG;
|
||||
}
|
||||
|
||||
fc_seq_exch(cmd->seq)->lp->tt.seq_set_resp(cmd->seq, ft_recv_seq, cmd);
|
||||
|
|
|
|||
Loading…
Reference in a new issue