Lines Matching refs:se_cmd

115 static int target_xcopy_parse_tiddesc_e4(struct se_cmd *se_cmd, struct xcopy_op *xop,  in target_xcopy_parse_tiddesc_e4()  argument
175 xop->src_dev = se_cmd->se_dev; in target_xcopy_parse_tiddesc_e4()
192 xop->dst_dev = se_cmd->se_dev; in target_xcopy_parse_tiddesc_e4()
201 static int target_xcopy_parse_target_descriptors(struct se_cmd *se_cmd, in target_xcopy_parse_target_descriptors() argument
205 struct se_device *local_dev = se_cmd->se_dev; in target_xcopy_parse_target_descriptors()
241 rc = target_xcopy_parse_tiddesc_e4(se_cmd, xop, in target_xcopy_parse_target_descriptors()
259 rc = target_xcopy_locate_se_dev_e4(se_cmd->se_sess, in target_xcopy_parse_target_descriptors()
265 rc = target_xcopy_locate_se_dev_e4(se_cmd->se_sess, in target_xcopy_parse_target_descriptors()
391 struct se_cmd se_cmd; member
400 static int xcopy_pt_get_cmd_state(struct se_cmd *se_cmd) in xcopy_pt_get_cmd_state() argument
415 static void xcopy_pt_release_cmd(struct se_cmd *se_cmd) in xcopy_pt_release_cmd() argument
417 struct xcopy_pt_cmd *xpt_cmd = container_of(se_cmd, in xcopy_pt_release_cmd()
418 struct xcopy_pt_cmd, se_cmd); in xcopy_pt_release_cmd()
424 static int xcopy_pt_check_stop_free(struct se_cmd *se_cmd) in xcopy_pt_check_stop_free() argument
426 struct xcopy_pt_cmd *xpt_cmd = container_of(se_cmd, in xcopy_pt_check_stop_free()
427 struct xcopy_pt_cmd, se_cmd); in xcopy_pt_check_stop_free()
433 static int xcopy_pt_write_pending(struct se_cmd *se_cmd) in xcopy_pt_write_pending() argument
438 static int xcopy_pt_queue_data_in(struct se_cmd *se_cmd) in xcopy_pt_queue_data_in() argument
443 static int xcopy_pt_queue_status(struct se_cmd *se_cmd) in xcopy_pt_queue_status() argument
517 struct se_cmd *cmd = &xpt_cmd->se_cmd; in target_xcopy_setup_pt_cmd()
551 struct se_cmd *se_cmd = &xpt_cmd->se_cmd; in target_xcopy_issue_pt_cmd() local
554 sense_rc = transport_generic_new_cmd(se_cmd); in target_xcopy_issue_pt_cmd()
558 if (se_cmd->data_direction == DMA_TO_DEVICE) in target_xcopy_issue_pt_cmd()
559 target_execute_cmd(se_cmd); in target_xcopy_issue_pt_cmd()
564 se_cmd->scsi_status); in target_xcopy_issue_pt_cmd()
566 return (se_cmd->scsi_status) ? -EINVAL : 0; in target_xcopy_issue_pt_cmd()
570 struct se_cmd *ec_cmd, in target_xcopy_read_source()
577 struct se_cmd *se_cmd = &xpt_cmd.se_cmd; in target_xcopy_read_source() local
593 __target_init_cmd(se_cmd, &xcopy_pt_tfo, &xcopy_pt_sess, src_bytes, in target_xcopy_read_source()
599 ec_cmd->scsi_status = se_cmd->scsi_status; in target_xcopy_read_source()
608 ec_cmd->scsi_status = se_cmd->scsi_status; in target_xcopy_read_source()
610 transport_generic_free_cmd(se_cmd, 0); in target_xcopy_read_source()
615 struct se_cmd *ec_cmd, in target_xcopy_write_destination()
622 struct se_cmd *se_cmd = &xpt_cmd.se_cmd; in target_xcopy_write_destination() local
638 __target_init_cmd(se_cmd, &xcopy_pt_tfo, &xcopy_pt_sess, dst_bytes, in target_xcopy_write_destination()
644 ec_cmd->scsi_status = se_cmd->scsi_status; in target_xcopy_write_destination()
650 ec_cmd->scsi_status = se_cmd->scsi_status; in target_xcopy_write_destination()
652 transport_generic_free_cmd(se_cmd, 0); in target_xcopy_write_destination()
659 struct se_cmd *ec_cmd = xop->xop_se_cmd; in target_xcopy_do_work()
788 struct se_cmd *se_cmd = xop->xop_se_cmd; in target_parse_xcopy_cmd() local
795 p = transport_kmap_data_sg(se_cmd); in target_parse_xcopy_cmd()
822 if (se_cmd->data_length < (XCOPY_HDR_LEN + tdll + sdll + inline_dl)) { in target_parse_xcopy_cmd()
825 se_cmd->data_length, tdll, sdll, inline_dl); in target_parse_xcopy_cmd()
847 rc = target_xcopy_parse_target_descriptors(se_cmd, xop, &p[16], tdll, &ret); in target_parse_xcopy_cmd()
864 transport_kunmap_data_sg(se_cmd); in target_parse_xcopy_cmd()
869 transport_kunmap_data_sg(se_cmd); in target_parse_xcopy_cmd()
873 sense_reason_t target_do_xcopy(struct se_cmd *se_cmd) in target_do_xcopy() argument
875 struct se_device *dev = se_cmd->se_dev; in target_do_xcopy()
884 sa = se_cmd->t_task_cdb[1] & 0x1f; in target_do_xcopy()
890 if (se_cmd->data_length == 0) { in target_do_xcopy()
891 target_complete_cmd(se_cmd, SAM_STAT_GOOD); in target_do_xcopy()
894 if (se_cmd->data_length < XCOPY_HDR_LEN) { in target_do_xcopy()
896 se_cmd->data_length, XCOPY_HDR_LEN); in target_do_xcopy()
903 xop->xop_se_cmd = se_cmd; in target_do_xcopy()
916 static sense_reason_t target_rcr_operating_parameters(struct se_cmd *se_cmd) in target_rcr_operating_parameters() argument
920 p = transport_kmap_data_sg(se_cmd); in target_rcr_operating_parameters()
927 if (se_cmd->data_length < 54) { in target_rcr_operating_parameters()
929 " too small: %u\n", se_cmd->data_length); in target_rcr_operating_parameters()
930 transport_kunmap_data_sg(se_cmd); in target_rcr_operating_parameters()
1000 transport_kunmap_data_sg(se_cmd); in target_rcr_operating_parameters()
1001 target_complete_cmd(se_cmd, SAM_STAT_GOOD); in target_rcr_operating_parameters()
1006 sense_reason_t target_do_receive_copy_results(struct se_cmd *se_cmd) in target_do_receive_copy_results() argument
1008 unsigned char *cdb = &se_cmd->t_task_cdb[0]; in target_do_receive_copy_results()
1010 struct se_device *dev = se_cmd->se_dev; in target_do_receive_copy_results()
1019 " 0x%02x, AL: %u\n", sa, list_id, se_cmd->data_length); in target_do_receive_copy_results()
1029 rc = target_rcr_operating_parameters(se_cmd); in target_do_receive_copy_results()