Lines Matching defs:tl_cmd
68 struct tcm_loop_cmd *tl_cmd = container_of(se_cmd,
70 struct scsi_cmnd *sc = tl_cmd->sc;
73 kmem_cache_free(tcm_loop_cmd_cache, tl_cmd);
102 static void tcm_loop_target_queue_cmd(struct tcm_loop_cmd *tl_cmd)
104 struct se_cmd *se_cmd = &tl_cmd->tl_se_cmd;
105 struct scsi_cmnd *sc = tl_cmd->sc;
147 se_cmd->tag = tl_cmd->sc_cmd_tag;
148 target_init_cmd(se_cmd, tl_nexus->se_sess, &tl_cmd->tl_sense_buf[0],
149 tl_cmd->sc->device->lun, transfer_length,
172 struct tcm_loop_cmd *tl_cmd = scsi_cmd_priv(sc);
179 memset(tl_cmd, 0, sizeof(*tl_cmd));
180 tl_cmd->sc = sc;
181 tl_cmd->sc_cmd_tag = blk_mq_unique_tag(scsi_cmd_to_rq(sc));
183 tcm_loop_target_queue_cmd(tl_cmd);
197 struct tcm_loop_cmd *tl_cmd;
209 tl_cmd = kmem_cache_zalloc(tcm_loop_cmd_cache, GFP_KERNEL);
210 if (!tl_cmd)
213 init_completion(&tl_cmd->tmr_done);
215 se_cmd = &tl_cmd->tl_se_cmd;
218 rc = target_submit_tmr(se_cmd, se_sess, tl_cmd->tl_sense_buf, lun,
223 wait_for_completion(&tl_cmd->tmr_done);
231 kmem_cache_free(tcm_loop_cmd_cache, tl_cmd);
476 struct tcm_loop_cmd *tl_cmd = container_of(se_cmd,
479 return tl_cmd->sc_cmd_state;
500 struct tcm_loop_cmd *tl_cmd = container_of(se_cmd,
502 struct scsi_cmnd *sc = tl_cmd->sc;
537 struct tcm_loop_cmd *tl_cmd = container_of(se_cmd,
541 complete(&tl_cmd->tmr_done);