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()
108 static void tcm_loop_target_queue_cmd(struct tcm_loop_cmd *tl_cmd) in tcm_loop_target_queue_cmd() argument
110 struct se_cmd *se_cmd = &tl_cmd->tl_se_cmd; in tcm_loop_target_queue_cmd()
111 struct scsi_cmnd *sc = tl_cmd->sc; 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()
155 tl_cmd->sc->device->lun, transfer_length, in tcm_loop_target_queue_cmd()
177 struct tcm_loop_cmd *tl_cmd = scsi_cmd_priv(sc); in tcm_loop_queuecommand() local
184 memset(tl_cmd, 0, sizeof(*tl_cmd)); in tcm_loop_queuecommand()
185 tl_cmd->sc = sc; in tcm_loop_queuecommand()
186 tl_cmd->sc_cmd_tag = scsi_cmd_to_rq(sc)->tag; in tcm_loop_queuecommand()
188 tcm_loop_target_queue_cmd(tl_cmd); in tcm_loop_queuecommand()
202 struct tcm_loop_cmd *tl_cmd; in tcm_loop_issue_tmr() local
214 tl_cmd = kmem_cache_zalloc(tcm_loop_cmd_cache, GFP_KERNEL); in tcm_loop_issue_tmr()
215 if (!tl_cmd) in tcm_loop_issue_tmr()
218 init_completion(&tl_cmd->tmr_done); in tcm_loop_issue_tmr()
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()
228 wait_for_completion(&tl_cmd->tmr_done); in tcm_loop_issue_tmr()
236 kmem_cache_free(tcm_loop_cmd_cache, tl_cmd); in tcm_loop_issue_tmr()
531 struct tcm_loop_cmd *tl_cmd = container_of(se_cmd, in tcm_loop_get_cmd_state() local
534 return tl_cmd->sc_cmd_state; in tcm_loop_get_cmd_state()
555 struct tcm_loop_cmd *tl_cmd = container_of(se_cmd, in tcm_loop_queue_data_or_status() local
557 struct scsi_cmnd *sc = tl_cmd->sc; in tcm_loop_queue_data_or_status()
592 struct tcm_loop_cmd *tl_cmd = container_of(se_cmd, in tcm_loop_queue_tm_rsp() local
596 complete(&tl_cmd->tmr_done); in tcm_loop_queue_tm_rsp()