Lines Matching refs:tl_cmd
68 struct tcm_loop_cmd *tl_cmd = container_of(se_cmd, in tcm_loop_release_cmd() local
70 struct scsi_cmnd *sc = tl_cmd->sc; in tcm_loop_release_cmd()
73 kmem_cache_free(tcm_loop_cmd_cache, tl_cmd); in tcm_loop_release_cmd()
102 static void tcm_loop_target_queue_cmd(struct tcm_loop_cmd *tl_cmd) in tcm_loop_target_queue_cmd() argument
104 struct se_cmd *se_cmd = &tl_cmd->tl_se_cmd; in tcm_loop_target_queue_cmd()
105 struct scsi_cmnd *sc = tl_cmd->sc; in tcm_loop_target_queue_cmd()
147 se_cmd->tag = tl_cmd->sc_cmd_tag; in tcm_loop_target_queue_cmd()
148 target_init_cmd(se_cmd, tl_nexus->se_sess, &tl_cmd->tl_sense_buf[0], in tcm_loop_target_queue_cmd()
149 tl_cmd->sc->device->lun, transfer_length, in tcm_loop_target_queue_cmd()
172 struct tcm_loop_cmd *tl_cmd = scsi_cmd_priv(sc); in tcm_loop_queuecommand() local
179 memset(tl_cmd, 0, sizeof(*tl_cmd)); in tcm_loop_queuecommand()
180 tl_cmd->sc = sc; in tcm_loop_queuecommand()
181 tl_cmd->sc_cmd_tag = blk_mq_unique_tag(scsi_cmd_to_rq(sc)); in tcm_loop_queuecommand()
183 tcm_loop_target_queue_cmd(tl_cmd); in tcm_loop_queuecommand()
197 struct tcm_loop_cmd *tl_cmd; in tcm_loop_issue_tmr() local
209 tl_cmd = kmem_cache_zalloc(tcm_loop_cmd_cache, GFP_KERNEL); in tcm_loop_issue_tmr()
210 if (!tl_cmd) in tcm_loop_issue_tmr()
213 init_completion(&tl_cmd->tmr_done); in tcm_loop_issue_tmr()
215 se_cmd = &tl_cmd->tl_se_cmd; in tcm_loop_issue_tmr()
218 rc = target_submit_tmr(se_cmd, se_sess, tl_cmd->tl_sense_buf, lun, in tcm_loop_issue_tmr()
223 wait_for_completion(&tl_cmd->tmr_done); in tcm_loop_issue_tmr()
231 kmem_cache_free(tcm_loop_cmd_cache, tl_cmd); in tcm_loop_issue_tmr()
276 struct tcm_loop_cmd *tl_cmd = scsi_cmd_priv(sc); in tcm_loop_flush_work_iter() local
277 struct se_cmd *se_cmd = &tl_cmd->tl_se_cmd; in tcm_loop_flush_work_iter()
532 struct tcm_loop_cmd *tl_cmd = container_of(se_cmd, in tcm_loop_get_cmd_state() local
535 return tl_cmd->sc_cmd_state; in tcm_loop_get_cmd_state()
556 struct tcm_loop_cmd *tl_cmd = container_of(se_cmd, in tcm_loop_queue_data_or_status() local
558 struct scsi_cmnd *sc = tl_cmd->sc; in tcm_loop_queue_data_or_status()
593 struct tcm_loop_cmd *tl_cmd = container_of(se_cmd, in tcm_loop_queue_tm_rsp() local
597 complete(&tl_cmd->tmr_done); in tcm_loop_queue_tm_rsp()