Lines Matching refs:se_cmd

46 static int tcm_loop_queue_status(struct se_cmd *se_cmd);
60 static int tcm_loop_check_stop_free(struct se_cmd *se_cmd) in tcm_loop_check_stop_free() argument
62 return transport_generic_free_cmd(se_cmd, 0); in tcm_loop_check_stop_free()
65 static void tcm_loop_release_cmd(struct se_cmd *se_cmd) in tcm_loop_release_cmd() argument
67 struct tcm_loop_cmd *tl_cmd = container_of(se_cmd, in tcm_loop_release_cmd()
71 if (se_cmd->se_cmd_flags & SCF_SCSI_TMR_CDB) in tcm_loop_release_cmd()
103 struct se_cmd *se_cmd = &tl_cmd->tl_se_cmd; in tcm_loop_target_queue_cmd() local
137 se_cmd->prot_pto = true; in tcm_loop_target_queue_cmd()
146 se_cmd->tag = tl_cmd->sc_cmd_tag; in tcm_loop_target_queue_cmd()
147 target_init_cmd(se_cmd, tl_nexus->se_sess, &tl_cmd->tl_sense_buf[0], in tcm_loop_target_queue_cmd()
151 if (target_submit_prep(se_cmd, sc->cmnd, scsi_sglist(sc), in tcm_loop_target_queue_cmd()
157 target_queue_submission(se_cmd); in tcm_loop_target_queue_cmd()
192 struct se_cmd *se_cmd; in tcm_loop_issue_tmr() local
213 se_cmd = &tl_cmd->tl_se_cmd; in tcm_loop_issue_tmr()
216 rc = target_submit_tmr(se_cmd, se_sess, tl_cmd->tl_sense_buf, lun, in tcm_loop_issue_tmr()
222 ret = se_cmd->se_tmr_req->response; in tcm_loop_issue_tmr()
223 target_put_sess_cmd(se_cmd); in tcm_loop_issue_tmr()
488 static int tcm_loop_get_cmd_state(struct se_cmd *se_cmd) in tcm_loop_get_cmd_state() argument
490 struct tcm_loop_cmd *tl_cmd = container_of(se_cmd, in tcm_loop_get_cmd_state()
496 static int tcm_loop_write_pending(struct se_cmd *se_cmd) in tcm_loop_write_pending() argument
507 target_execute_cmd(se_cmd); in tcm_loop_write_pending()
512 struct se_cmd *se_cmd, u8 scsi_status) in tcm_loop_queue_data_or_status() argument
514 struct tcm_loop_cmd *tl_cmd = container_of(se_cmd, in tcm_loop_queue_data_or_status()
521 if (se_cmd->sense_buffer && in tcm_loop_queue_data_or_status()
522 ((se_cmd->se_cmd_flags & SCF_TRANSPORT_TASK_SENSE) || in tcm_loop_queue_data_or_status()
523 (se_cmd->se_cmd_flags & SCF_EMULATED_TASK_SENSE))) { in tcm_loop_queue_data_or_status()
525 memcpy(sc->sense_buffer, se_cmd->sense_buffer, in tcm_loop_queue_data_or_status()
532 if ((se_cmd->se_cmd_flags & SCF_OVERFLOW_BIT) || in tcm_loop_queue_data_or_status()
533 (se_cmd->se_cmd_flags & SCF_UNDERFLOW_BIT)) in tcm_loop_queue_data_or_status()
534 scsi_set_resid(sc, se_cmd->residual_count); in tcm_loop_queue_data_or_status()
538 static int tcm_loop_queue_data_in(struct se_cmd *se_cmd) in tcm_loop_queue_data_in() argument
540 return tcm_loop_queue_data_or_status(__func__, se_cmd, SAM_STAT_GOOD); in tcm_loop_queue_data_in()
543 static int tcm_loop_queue_status(struct se_cmd *se_cmd) in tcm_loop_queue_status() argument
546 se_cmd, se_cmd->scsi_status); in tcm_loop_queue_status()
549 static void tcm_loop_queue_tm_rsp(struct se_cmd *se_cmd) in tcm_loop_queue_tm_rsp() argument
551 struct tcm_loop_cmd *tl_cmd = container_of(se_cmd, in tcm_loop_queue_tm_rsp()
558 static void tcm_loop_aborted_task(struct se_cmd *se_cmd) in tcm_loop_aborted_task() argument