Lines Matching refs:tl_cmd
59 struct tcm_loop_cmd *tl_cmd = container_of(se_cmd, in tcm_loop_release_cmd() local
62 kmem_cache_free(tcm_loop_cmd_cache, tl_cmd); in tcm_loop_release_cmd()
98 struct tcm_loop_cmd *tl_cmd = in tcm_loop_submission_work() local
100 struct se_cmd *se_cmd = &tl_cmd->tl_se_cmd; in tcm_loop_submission_work()
101 struct scsi_cmnd *sc = tl_cmd->sc; in tcm_loop_submission_work()
152 se_cmd->tag = tl_cmd->sc_cmd_tag; in tcm_loop_submission_work()
154 &tl_cmd->tl_sense_buf[0], tl_cmd->sc->device->lun, in tcm_loop_submission_work()
167 kmem_cache_free(tcm_loop_cmd_cache, tl_cmd); in tcm_loop_submission_work()
177 struct tcm_loop_cmd *tl_cmd; in tcm_loop_queuecommand() local
184 tl_cmd = kmem_cache_zalloc(tcm_loop_cmd_cache, GFP_ATOMIC); in tcm_loop_queuecommand()
185 if (!tl_cmd) { in tcm_loop_queuecommand()
191 tl_cmd->sc = sc; in tcm_loop_queuecommand()
192 tl_cmd->sc_cmd_tag = sc->request->tag; in tcm_loop_queuecommand()
193 INIT_WORK(&tl_cmd->work, tcm_loop_submission_work); in tcm_loop_queuecommand()
194 queue_work(tcm_loop_workqueue, &tl_cmd->work); in tcm_loop_queuecommand()
208 struct tcm_loop_cmd *tl_cmd; in tcm_loop_issue_tmr() local
220 tl_cmd = kmem_cache_zalloc(tcm_loop_cmd_cache, GFP_KERNEL); in tcm_loop_issue_tmr()
221 if (!tl_cmd) in tcm_loop_issue_tmr()
224 init_completion(&tl_cmd->tmr_done); in tcm_loop_issue_tmr()
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()
234 wait_for_completion(&tl_cmd->tmr_done); in tcm_loop_issue_tmr()
242 kmem_cache_free(tcm_loop_cmd_cache, tl_cmd); in tcm_loop_issue_tmr()
547 struct tcm_loop_cmd *tl_cmd = container_of(se_cmd, in tcm_loop_get_cmd_state() local
550 return tl_cmd->sc_cmd_state; in tcm_loop_get_cmd_state()
575 struct tcm_loop_cmd *tl_cmd = container_of(se_cmd, in tcm_loop_queue_data_in() local
577 struct scsi_cmnd *sc = tl_cmd->sc; in tcm_loop_queue_data_in()
593 struct tcm_loop_cmd *tl_cmd = container_of(se_cmd, in tcm_loop_queue_status() local
595 struct scsi_cmnd *sc = tl_cmd->sc; in tcm_loop_queue_status()
621 struct tcm_loop_cmd *tl_cmd = container_of(se_cmd, in tcm_loop_queue_tm_rsp() local
625 complete(&tl_cmd->tmr_done); in tcm_loop_queue_tm_rsp()