Lines Matching refs:tl_cmd
67 struct tcm_loop_cmd *tl_cmd = container_of(se_cmd, in tcm_loop_release_cmd() local
69 struct scsi_cmnd *sc = tl_cmd->sc; in tcm_loop_release_cmd()
72 kmem_cache_free(tcm_loop_cmd_cache, tl_cmd); in tcm_loop_release_cmd()
101 static void tcm_loop_target_queue_cmd(struct tcm_loop_cmd *tl_cmd) in tcm_loop_target_queue_cmd() argument
103 struct se_cmd *se_cmd = &tl_cmd->tl_se_cmd; in tcm_loop_target_queue_cmd()
104 struct scsi_cmnd *sc = tl_cmd->sc; 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()
148 tl_cmd->sc->device->lun, transfer_length, in tcm_loop_target_queue_cmd()
170 struct tcm_loop_cmd *tl_cmd = scsi_cmd_priv(sc); in tcm_loop_queuecommand() local
177 memset(tl_cmd, 0, sizeof(*tl_cmd)); in tcm_loop_queuecommand()
178 tl_cmd->sc = sc; in tcm_loop_queuecommand()
179 tl_cmd->sc_cmd_tag = blk_mq_unique_tag(scsi_cmd_to_rq(sc)); in tcm_loop_queuecommand()
181 tcm_loop_target_queue_cmd(tl_cmd); in tcm_loop_queuecommand()
195 struct tcm_loop_cmd *tl_cmd; in tcm_loop_issue_tmr() local
207 tl_cmd = kmem_cache_zalloc(tcm_loop_cmd_cache, GFP_KERNEL); in tcm_loop_issue_tmr()
208 if (!tl_cmd) in tcm_loop_issue_tmr()
211 init_completion(&tl_cmd->tmr_done); in tcm_loop_issue_tmr()
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()
221 wait_for_completion(&tl_cmd->tmr_done); in tcm_loop_issue_tmr()
229 kmem_cache_free(tcm_loop_cmd_cache, tl_cmd); in tcm_loop_issue_tmr()
491 struct tcm_loop_cmd *tl_cmd = container_of(se_cmd, in tcm_loop_get_cmd_state() local
494 return tl_cmd->sc_cmd_state; in tcm_loop_get_cmd_state()
515 struct tcm_loop_cmd *tl_cmd = container_of(se_cmd, in tcm_loop_queue_data_or_status() local
517 struct scsi_cmnd *sc = tl_cmd->sc; in tcm_loop_queue_data_or_status()
552 struct tcm_loop_cmd *tl_cmd = container_of(se_cmd, in tcm_loop_queue_tm_rsp() local
556 complete(&tl_cmd->tmr_done); in tcm_loop_queue_tm_rsp()