Lines Matching defs:se_cmd

116 static int target_xcopy_parse_tiddesc_e4(struct se_cmd *se_cmd, struct xcopy_op *xop,
176 xop->src_dev = se_cmd->se_dev;
193 xop->dst_dev = se_cmd->se_dev;
202 static int target_xcopy_parse_target_descriptors(struct se_cmd *se_cmd,
206 struct se_device *local_dev = se_cmd->se_dev;
242 rc = target_xcopy_parse_tiddesc_e4(se_cmd, xop,
260 rc = target_xcopy_locate_se_dev_e4(se_cmd->se_sess,
266 rc = target_xcopy_locate_se_dev_e4(se_cmd->se_sess,
392 struct se_cmd se_cmd;
401 static int xcopy_pt_get_cmd_state(struct se_cmd *se_cmd)
416 static void xcopy_pt_release_cmd(struct se_cmd *se_cmd)
418 struct xcopy_pt_cmd *xpt_cmd = container_of(se_cmd,
419 struct xcopy_pt_cmd, se_cmd);
425 static int xcopy_pt_check_stop_free(struct se_cmd *se_cmd)
427 struct xcopy_pt_cmd *xpt_cmd = container_of(se_cmd,
428 struct xcopy_pt_cmd, se_cmd);
434 static int xcopy_pt_write_pending(struct se_cmd *se_cmd)
439 static int xcopy_pt_queue_data_in(struct se_cmd *se_cmd)
444 static int xcopy_pt_queue_status(struct se_cmd *se_cmd)
518 struct se_cmd *cmd = &xpt_cmd->se_cmd;
552 struct se_cmd *se_cmd = &xpt_cmd->se_cmd;
555 sense_rc = transport_generic_new_cmd(se_cmd);
559 if (se_cmd->data_direction == DMA_TO_DEVICE)
560 target_execute_cmd(se_cmd);
565 se_cmd->scsi_status);
567 return (se_cmd->scsi_status) ? -EINVAL : 0;
571 struct se_cmd *ec_cmd,
578 struct se_cmd *se_cmd = &xpt_cmd.se_cmd;
594 __target_init_cmd(se_cmd, &xcopy_pt_tfo, &xcopy_pt_sess, src_bytes,
600 ec_cmd->scsi_status = se_cmd->scsi_status;
609 ec_cmd->scsi_status = se_cmd->scsi_status;
611 transport_generic_free_cmd(se_cmd, 0);
616 struct se_cmd *ec_cmd,
623 struct se_cmd *se_cmd = &xpt_cmd.se_cmd;
639 __target_init_cmd(se_cmd, &xcopy_pt_tfo, &xcopy_pt_sess, dst_bytes,
645 ec_cmd->scsi_status = se_cmd->scsi_status;
651 ec_cmd->scsi_status = se_cmd->scsi_status;
653 transport_generic_free_cmd(se_cmd, 0);
660 struct se_cmd *ec_cmd = xop->xop_se_cmd;
789 struct se_cmd *se_cmd = xop->xop_se_cmd;
796 p = transport_kmap_data_sg(se_cmd);
823 if (se_cmd->data_length < (XCOPY_HDR_LEN + tdll + sdll + inline_dl)) {
826 se_cmd->data_length, tdll, sdll, inline_dl);
848 rc = target_xcopy_parse_target_descriptors(se_cmd, xop, &p[16], tdll, &ret);
865 transport_kunmap_data_sg(se_cmd);
870 transport_kunmap_data_sg(se_cmd);
874 sense_reason_t target_do_xcopy(struct se_cmd *se_cmd)
876 struct se_device *dev = se_cmd->se_dev;
885 sa = se_cmd->t_task_cdb[1] & 0x1f;
891 if (se_cmd->data_length == 0) {
892 target_complete_cmd(se_cmd, SAM_STAT_GOOD);
895 if (se_cmd->data_length < XCOPY_HDR_LEN) {
897 se_cmd->data_length, XCOPY_HDR_LEN);
904 xop->xop_se_cmd = se_cmd;
917 static sense_reason_t target_rcr_operating_parameters(struct se_cmd *se_cmd)
921 p = transport_kmap_data_sg(se_cmd);
928 if (se_cmd->data_length < 54) {
930 " too small: %u\n", se_cmd->data_length);
931 transport_kunmap_data_sg(se_cmd);
1001 transport_kunmap_data_sg(se_cmd);
1002 target_complete_cmd(se_cmd, SAM_STAT_GOOD);
1007 sense_reason_t target_do_receive_copy_results(struct se_cmd *se_cmd)
1009 unsigned char *cdb = &se_cmd->t_task_cdb[0];
1011 struct se_device *dev = se_cmd->se_dev;
1020 " 0x%02x, AL: %u\n", sa, list_id, se_cmd->data_length);
1030 rc = target_rcr_operating_parameters(se_cmd);