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()
110 struct se_cmd *se_cmd = &tl_cmd->tl_se_cmd; in tcm_loop_target_queue_cmd() local
144 se_cmd->prot_pto = true; in tcm_loop_target_queue_cmd()
153 se_cmd->tag = tl_cmd->sc_cmd_tag; in tcm_loop_target_queue_cmd()
154 target_init_cmd(se_cmd, tl_nexus->se_sess, &tl_cmd->tl_sense_buf[0], in tcm_loop_target_queue_cmd()
158 if (target_submit_prep(se_cmd, sc->cmnd, scsi_sglist(sc), in tcm_loop_target_queue_cmd()
164 target_queue_submission(se_cmd); in tcm_loop_target_queue_cmd()
199 struct se_cmd *se_cmd; in tcm_loop_issue_tmr() local
220 se_cmd = &tl_cmd->tl_se_cmd; in tcm_loop_issue_tmr()
223 rc = target_submit_tmr(se_cmd, se_sess, tl_cmd->tl_sense_buf, lun, in tcm_loop_issue_tmr()
229 ret = se_cmd->se_tmr_req->response; in tcm_loop_issue_tmr()
230 target_put_sess_cmd(se_cmd); in tcm_loop_issue_tmr()
528 static int tcm_loop_get_cmd_state(struct se_cmd *se_cmd) in tcm_loop_get_cmd_state() argument
530 struct tcm_loop_cmd *tl_cmd = container_of(se_cmd, in tcm_loop_get_cmd_state()
536 static int tcm_loop_write_pending(struct se_cmd *se_cmd) in tcm_loop_write_pending() argument
547 target_execute_cmd(se_cmd); in tcm_loop_write_pending()
552 struct se_cmd *se_cmd, u8 scsi_status) in tcm_loop_queue_data_or_status() argument
554 struct tcm_loop_cmd *tl_cmd = container_of(se_cmd, in tcm_loop_queue_data_or_status()
561 if (se_cmd->sense_buffer && in tcm_loop_queue_data_or_status()
562 ((se_cmd->se_cmd_flags & SCF_TRANSPORT_TASK_SENSE) || in tcm_loop_queue_data_or_status()
563 (se_cmd->se_cmd_flags & SCF_EMULATED_TASK_SENSE))) { in tcm_loop_queue_data_or_status()
565 memcpy(sc->sense_buffer, se_cmd->sense_buffer, in tcm_loop_queue_data_or_status()
572 if ((se_cmd->se_cmd_flags & SCF_OVERFLOW_BIT) || in tcm_loop_queue_data_or_status()
573 (se_cmd->se_cmd_flags & SCF_UNDERFLOW_BIT)) in tcm_loop_queue_data_or_status()
574 scsi_set_resid(sc, se_cmd->residual_count); in tcm_loop_queue_data_or_status()
578 static int tcm_loop_queue_data_in(struct se_cmd *se_cmd) in tcm_loop_queue_data_in() argument
580 return tcm_loop_queue_data_or_status(__func__, se_cmd, SAM_STAT_GOOD); in tcm_loop_queue_data_in()
583 static int tcm_loop_queue_status(struct se_cmd *se_cmd) in tcm_loop_queue_status() argument
586 se_cmd, se_cmd->scsi_status); in tcm_loop_queue_status()
589 static void tcm_loop_queue_tm_rsp(struct se_cmd *se_cmd) in tcm_loop_queue_tm_rsp() argument
591 struct tcm_loop_cmd *tl_cmd = container_of(se_cmd, in tcm_loop_queue_tm_rsp()
598 static void tcm_loop_aborted_task(struct se_cmd *se_cmd) in tcm_loop_aborted_task() argument