Lines Matching refs:se_cmd
47 static int tcm_loop_queue_status(struct se_cmd *se_cmd);
52 static int tcm_loop_check_stop_free(struct se_cmd *se_cmd) in tcm_loop_check_stop_free() argument
54 return transport_generic_free_cmd(se_cmd, 0); in tcm_loop_check_stop_free()
57 static void tcm_loop_release_cmd(struct se_cmd *se_cmd) in tcm_loop_release_cmd() argument
59 struct tcm_loop_cmd *tl_cmd = container_of(se_cmd, in tcm_loop_release_cmd()
100 struct se_cmd *se_cmd = &tl_cmd->tl_se_cmd; in tcm_loop_submission_work() local
136 se_cmd->se_cmd_flags |= SCF_BIDI; in tcm_loop_submission_work()
143 se_cmd->prot_pto = true; in tcm_loop_submission_work()
152 se_cmd->tag = tl_cmd->sc_cmd_tag; in tcm_loop_submission_work()
153 rc = target_submit_cmd_map_sgls(se_cmd, tl_nexus->se_sess, sc->cmnd, in tcm_loop_submission_work()
205 struct se_cmd *se_cmd; in tcm_loop_issue_tmr() local
226 se_cmd = &tl_cmd->tl_se_cmd; in tcm_loop_issue_tmr()
229 rc = target_submit_tmr(se_cmd, se_sess, tl_cmd->tl_sense_buf, lun, in tcm_loop_issue_tmr()
235 ret = se_cmd->se_tmr_req->response; in tcm_loop_issue_tmr()
236 target_put_sess_cmd(se_cmd); in tcm_loop_issue_tmr()
545 static int tcm_loop_get_cmd_state(struct se_cmd *se_cmd) in tcm_loop_get_cmd_state() argument
547 struct tcm_loop_cmd *tl_cmd = container_of(se_cmd, in tcm_loop_get_cmd_state()
553 static int tcm_loop_write_pending(struct se_cmd *se_cmd) in tcm_loop_write_pending() argument
564 target_execute_cmd(se_cmd); in tcm_loop_write_pending()
568 static int tcm_loop_write_pending_status(struct se_cmd *se_cmd) in tcm_loop_write_pending_status() argument
573 static int tcm_loop_queue_data_in(struct se_cmd *se_cmd) in tcm_loop_queue_data_in() argument
575 struct tcm_loop_cmd *tl_cmd = container_of(se_cmd, in tcm_loop_queue_data_in()
584 if ((se_cmd->se_cmd_flags & SCF_OVERFLOW_BIT) || in tcm_loop_queue_data_in()
585 (se_cmd->se_cmd_flags & SCF_UNDERFLOW_BIT)) in tcm_loop_queue_data_in()
586 scsi_set_resid(sc, se_cmd->residual_count); in tcm_loop_queue_data_in()
591 static int tcm_loop_queue_status(struct se_cmd *se_cmd) in tcm_loop_queue_status() argument
593 struct tcm_loop_cmd *tl_cmd = container_of(se_cmd, in tcm_loop_queue_status()
600 if (se_cmd->sense_buffer && in tcm_loop_queue_status()
601 ((se_cmd->se_cmd_flags & SCF_TRANSPORT_TASK_SENSE) || in tcm_loop_queue_status()
602 (se_cmd->se_cmd_flags & SCF_EMULATED_TASK_SENSE))) { in tcm_loop_queue_status()
604 memcpy(sc->sense_buffer, se_cmd->sense_buffer, in tcm_loop_queue_status()
609 sc->result = se_cmd->scsi_status; in tcm_loop_queue_status()
612 if ((se_cmd->se_cmd_flags & SCF_OVERFLOW_BIT) || in tcm_loop_queue_status()
613 (se_cmd->se_cmd_flags & SCF_UNDERFLOW_BIT)) in tcm_loop_queue_status()
614 scsi_set_resid(sc, se_cmd->residual_count); in tcm_loop_queue_status()
619 static void tcm_loop_queue_tm_rsp(struct se_cmd *se_cmd) in tcm_loop_queue_tm_rsp() argument
621 struct tcm_loop_cmd *tl_cmd = container_of(se_cmd, in tcm_loop_queue_tm_rsp()
628 static void tcm_loop_aborted_task(struct se_cmd *se_cmd) in tcm_loop_aborted_task() argument