Lines Matching refs:se_cmd

91 	struct se_cmd tvc_se_cmd;
214 struct se_cmd se_cmd; member
331 static void vhost_scsi_release_cmd_res(struct se_cmd *se_cmd) in vhost_scsi_release_cmd_res() argument
333 struct vhost_scsi_cmd *tv_cmd = container_of(se_cmd, in vhost_scsi_release_cmd_res()
349 sbitmap_clear_bit(&svq->scsi_tags, se_cmd->map_tag); in vhost_scsi_release_cmd_res()
364 static void vhost_scsi_release_cmd(struct se_cmd *se_cmd) in vhost_scsi_release_cmd() argument
366 if (se_cmd->se_cmd_flags & SCF_SCSI_TMR_CDB) { in vhost_scsi_release_cmd()
367 struct vhost_scsi_tmf *tmf = container_of(se_cmd, in vhost_scsi_release_cmd()
368 struct vhost_scsi_tmf, se_cmd); in vhost_scsi_release_cmd()
372 struct vhost_scsi_cmd *cmd = container_of(se_cmd, in vhost_scsi_release_cmd()
386 static int vhost_scsi_write_pending(struct se_cmd *se_cmd) in vhost_scsi_write_pending() argument
389 target_execute_cmd(se_cmd); in vhost_scsi_write_pending()
398 static int vhost_scsi_get_cmd_state(struct se_cmd *se_cmd) in vhost_scsi_get_cmd_state() argument
403 static int vhost_scsi_queue_data_in(struct se_cmd *se_cmd) in vhost_scsi_queue_data_in() argument
405 transport_generic_free_cmd(se_cmd, 0); in vhost_scsi_queue_data_in()
409 static int vhost_scsi_queue_status(struct se_cmd *se_cmd) in vhost_scsi_queue_status() argument
411 transport_generic_free_cmd(se_cmd, 0); in vhost_scsi_queue_status()
415 static void vhost_scsi_queue_tm_rsp(struct se_cmd *se_cmd) in vhost_scsi_queue_tm_rsp() argument
417 struct vhost_scsi_tmf *tmf = container_of(se_cmd, struct vhost_scsi_tmf, in vhost_scsi_queue_tm_rsp()
418 se_cmd); in vhost_scsi_queue_tm_rsp()
420 tmf->scsi_resp = se_cmd->se_tmr_req->response; in vhost_scsi_queue_tm_rsp()
421 transport_generic_free_cmd(&tmf->se_cmd, 0); in vhost_scsi_queue_tm_rsp()
424 static void vhost_scsi_aborted_task(struct se_cmd *se_cmd) in vhost_scsi_aborted_task() argument
461 static int vhost_scsi_check_stop_free(struct se_cmd *se_cmd) in vhost_scsi_check_stop_free() argument
463 return target_put_sess_cmd(se_cmd); in vhost_scsi_check_stop_free()
545 struct se_cmd *se_cmd; in vhost_scsi_complete_cmd_work() local
552 se_cmd = &cmd->tvc_se_cmd; in vhost_scsi_complete_cmd_work()
555 cmd, se_cmd->residual_count, se_cmd->scsi_status); in vhost_scsi_complete_cmd_work()
558 v_rsp.resid = cpu_to_vhost32(cmd->tvc_vq, se_cmd->residual_count); in vhost_scsi_complete_cmd_work()
560 v_rsp.status = se_cmd->scsi_status; in vhost_scsi_complete_cmd_work()
562 se_cmd->scsi_sense_length); in vhost_scsi_complete_cmd_work()
564 se_cmd->scsi_sense_length); in vhost_scsi_complete_cmd_work()
578 vhost_scsi_release_cmd_res(se_cmd); in vhost_scsi_complete_cmd_work()
774 struct se_cmd *se_cmd = &cmd->tvc_se_cmd; in vhost_scsi_target_queue_cmd() local
785 se_cmd->prot_pto = true; in vhost_scsi_target_queue_cmd()
791 se_cmd->tag = 0; in vhost_scsi_target_queue_cmd()
792 target_init_cmd(se_cmd, tv_nexus->tvn_se_sess, &cmd->tvc_sense_buf[0], in vhost_scsi_target_queue_cmd()
797 if (target_submit_prep(se_cmd, cmd->tvc_cdb, sg_ptr, in vhost_scsi_target_queue_cmd()
802 target_queue_submission(se_cmd); in vhost_scsi_target_queue_cmd()
1213 if (target_submit_tmr(&tmf->se_cmd, tpg->tpg_nexus->tvn_se_sess, NULL, in vhost_scsi_handle_tmf()