Lines Matching refs:se_cmd
91 struct se_cmd tvc_se_cmd;
208 struct se_cmd se_cmd; member
325 static void vhost_scsi_release_cmd_res(struct se_cmd *se_cmd) in vhost_scsi_release_cmd_res() argument
327 struct vhost_scsi_cmd *tv_cmd = container_of(se_cmd, in vhost_scsi_release_cmd_res()
343 sbitmap_clear_bit(&svq->scsi_tags, se_cmd->map_tag); in vhost_scsi_release_cmd_res()
358 static void vhost_scsi_release_cmd(struct se_cmd *se_cmd) in vhost_scsi_release_cmd() argument
360 if (se_cmd->se_cmd_flags & SCF_SCSI_TMR_CDB) { in vhost_scsi_release_cmd()
361 struct vhost_scsi_tmf *tmf = container_of(se_cmd, in vhost_scsi_release_cmd()
362 struct vhost_scsi_tmf, se_cmd); in vhost_scsi_release_cmd()
366 struct vhost_scsi_cmd *cmd = container_of(se_cmd, in vhost_scsi_release_cmd()
380 static int vhost_scsi_write_pending(struct se_cmd *se_cmd) in vhost_scsi_write_pending() argument
383 target_execute_cmd(se_cmd); in vhost_scsi_write_pending()
392 static int vhost_scsi_get_cmd_state(struct se_cmd *se_cmd) in vhost_scsi_get_cmd_state() argument
397 static int vhost_scsi_queue_data_in(struct se_cmd *se_cmd) in vhost_scsi_queue_data_in() argument
399 transport_generic_free_cmd(se_cmd, 0); in vhost_scsi_queue_data_in()
403 static int vhost_scsi_queue_status(struct se_cmd *se_cmd) in vhost_scsi_queue_status() argument
405 transport_generic_free_cmd(se_cmd, 0); in vhost_scsi_queue_status()
409 static void vhost_scsi_queue_tm_rsp(struct se_cmd *se_cmd) in vhost_scsi_queue_tm_rsp() argument
411 struct vhost_scsi_tmf *tmf = container_of(se_cmd, struct vhost_scsi_tmf, in vhost_scsi_queue_tm_rsp()
412 se_cmd); in vhost_scsi_queue_tm_rsp()
414 tmf->scsi_resp = se_cmd->se_tmr_req->response; in vhost_scsi_queue_tm_rsp()
415 transport_generic_free_cmd(&tmf->se_cmd, 0); in vhost_scsi_queue_tm_rsp()
418 static void vhost_scsi_aborted_task(struct se_cmd *se_cmd) in vhost_scsi_aborted_task() argument
455 static int vhost_scsi_check_stop_free(struct se_cmd *se_cmd) in vhost_scsi_check_stop_free() argument
457 return target_put_sess_cmd(se_cmd); in vhost_scsi_check_stop_free()
540 struct se_cmd *se_cmd; in vhost_scsi_complete_cmd_work() local
547 se_cmd = &cmd->tvc_se_cmd; in vhost_scsi_complete_cmd_work()
550 cmd, se_cmd->residual_count, se_cmd->scsi_status); in vhost_scsi_complete_cmd_work()
553 v_rsp.resid = cpu_to_vhost32(cmd->tvc_vq, se_cmd->residual_count); in vhost_scsi_complete_cmd_work()
555 v_rsp.status = se_cmd->scsi_status; in vhost_scsi_complete_cmd_work()
557 se_cmd->scsi_sense_length); in vhost_scsi_complete_cmd_work()
559 se_cmd->scsi_sense_length); in vhost_scsi_complete_cmd_work()
573 vhost_scsi_release_cmd_res(se_cmd); in vhost_scsi_complete_cmd_work()
771 struct se_cmd *se_cmd = &cmd->tvc_se_cmd; in vhost_scsi_target_queue_cmd() local
782 se_cmd->prot_pto = true; in vhost_scsi_target_queue_cmd()
788 se_cmd->tag = 0; in vhost_scsi_target_queue_cmd()
789 target_init_cmd(se_cmd, tv_nexus->tvn_se_sess, &cmd->tvc_sense_buf[0], in vhost_scsi_target_queue_cmd()
794 if (target_submit_prep(se_cmd, cmd->tvc_cdb, sg_ptr, in vhost_scsi_target_queue_cmd()
799 target_queue_submission(se_cmd); in vhost_scsi_target_queue_cmd()
1210 if (target_submit_tmr(&tmf->se_cmd, tpg->tpg_nexus->tvn_se_sess, NULL, in vhost_scsi_handle_tmf()