• Home
  • Raw
  • Download

Lines Matching refs:se_cmd

497 	    !(cmd->se_cmd.transport_state & CMD_T_FABRIC_STOP))  in iscsit_aborted_task()
844 const bool do_put = cmd->se_cmd.se_tfo != NULL; in iscsit_add_reject_from_cmd()
877 target_put_sess_cmd(&cmd->se_cmd); in iscsit_add_reject_from_cmd()
913 if (ent >= cmd->se_cmd.t_data_nents) { in iscsit_map_iovec()
918 sg = &cmd->se_cmd.t_data_sg[ent]; in iscsit_map_iovec()
984 u32 iov_count = max(1UL, DIV_ROUND_UP(cmd->se_cmd.data_length, PAGE_SIZE)); in iscsit_allocate_iovecs()
1161 transport_init_se_cmd(&cmd->se_cmd, &iscsi_ops, in iscsit_setup_scsi_cmd()
1171 target_get_sess_cmd(&cmd->se_cmd, true); in iscsit_setup_scsi_cmd()
1173 cmd->sense_reason = transport_lookup_cmd_lun(&cmd->se_cmd, in iscsit_setup_scsi_cmd()
1179 cmd->se_cmd.tag = (__force u32)cmd->init_task_tag; in iscsit_setup_scsi_cmd()
1180 cmd->sense_reason = target_setup_cmd_from_cdb(&cmd->se_cmd, hdr->cdb); in iscsit_setup_scsi_cmd()
1203 core_alua_check_nonop_delay(&cmd->se_cmd); in iscsit_setup_scsi_cmd()
1239 target_put_sess_cmd(&cmd->se_cmd); in iscsit_process_scsi_cmd()
1255 target_put_sess_cmd(&cmd->se_cmd); in iscsit_process_scsi_cmd()
1274 cmd->sense_reason = transport_generic_new_cmd(&cmd->se_cmd); in iscsit_process_scsi_cmd()
1300 if (cmd->first_burst_len > cmd->se_cmd.data_length) { in iscsit_get_immediate_data()
1324 target_put_sess_cmd(&cmd->se_cmd); in iscsit_get_immediate_data()
1451 struct se_cmd *se_cmd; in iscsit_check_dataout_hdr() local
1493 se_cmd = &cmd->se_cmd; in iscsit_check_dataout_hdr()
1496 if ((be32_to_cpu(hdr->offset) + payload_length) > cmd->se_cmd.data_length) { in iscsit_check_dataout_hdr()
1499 hdr->offset, payload_length, cmd->se_cmd.data_length); in iscsit_check_dataout_hdr()
1509 transport_send_check_condition_and_sense(&cmd->se_cmd, in iscsit_check_dataout_hdr()
1520 WARN_ON(se_cmd->t_state != TRANSPORT_WRITE_PENDING); in iscsit_check_dataout_hdr()
1521 if (!(se_cmd->se_cmd_flags & SCF_SUPPORTED_SAM_OPCODE)) in iscsit_check_dataout_hdr()
1533 transport_check_aborted_status(se_cmd, in iscsit_check_dataout_hdr()
1548 if (se_cmd->transport_state & CMD_T_ABORTED) { in iscsit_check_dataout_hdr()
1553 se_cmd, 1); in iscsit_check_dataout_hdr()
1669 target_execute_cmd(&cmd->se_cmd); in iscsit_check_dataout_payload()
1984 transport_init_se_cmd(&cmd->se_cmd, &iscsi_ops, in iscsit_handle_task_mgt_cmd()
1988 target_get_sess_cmd(&cmd->se_cmd, true); in iscsit_handle_task_mgt_cmd()
2024 ret = core_tmr_alloc_req(&cmd->se_cmd, cmd->tmr_req, tcm_function, in iscsit_handle_task_mgt_cmd()
2030 cmd->tmr_req->se_tmr_req = cmd->se_cmd.se_tmr_req; in iscsit_handle_task_mgt_cmd()
2039 se_tmr = cmd->se_cmd.se_tmr_req; in iscsit_handle_task_mgt_cmd()
2045 ret = transport_lookup_tmr_lun(&cmd->se_cmd, in iscsit_handle_task_mgt_cmd()
2109 target_put_sess_cmd(&cmd->se_cmd); in iscsit_handle_task_mgt_cmd()
2123 return transport_generic_handle_tmr(&cmd->se_cmd); in iscsit_handle_task_mgt_cmd()
2134 target_put_sess_cmd(&cmd->se_cmd); in iscsit_handle_task_mgt_cmd()
2664 if (cmd->write_data_done == cmd->se_cmd.data_length) { in iscsit_handle_immediate_data()
2766 if (cmd->se_cmd.se_cmd_flags & SCF_OVERFLOW_BIT) { in iscsit_build_datain_pdu()
2768 hdr->residual_count = cpu_to_be32(cmd->se_cmd.residual_count); in iscsit_build_datain_pdu()
2769 } else if (cmd->se_cmd.se_cmd_flags & SCF_UNDERFLOW_BIT) { in iscsit_build_datain_pdu()
2771 hdr->residual_count = cpu_to_be32(cmd->se_cmd.residual_count); in iscsit_build_datain_pdu()
2776 int_to_scsilun(cmd->se_cmd.orig_fe_lun, in iscsit_build_datain_pdu()
2822 if ((datain.offset + datain.length) > cmd->se_cmd.data_length) { in iscsit_send_datain()
2826 cmd->se_cmd.data_length); in iscsit_send_datain()
2836 (cmd->se_cmd.se_cmd_flags & SCF_TRANSPORT_TASK_SENSE)) in iscsit_send_datain()
2856 eodr = (cmd->se_cmd.se_cmd_flags & SCF_TRANSPORT_TASK_SENSE) ? in iscsit_send_datain()
3062 int_to_scsilun(cmd->se_cmd.orig_fe_lun, in iscsit_send_r2t()
3130 if (new_data_end > cmd->se_cmd.data_length) in iscsit_build_r2ts_for_cmd()
3131 xfer_len = cmd->se_cmd.data_length - offset; in iscsit_build_r2ts_for_cmd()
3140 if (new_data_end > cmd->se_cmd.data_length) in iscsit_build_r2ts_for_cmd()
3141 xfer_len = cmd->se_cmd.data_length - offset; in iscsit_build_r2ts_for_cmd()
3147 if (cmd->r2t_offset == cmd->se_cmd.data_length) in iscsit_build_r2ts_for_cmd()
3192 if (cmd->se_cmd.se_cmd_flags & SCF_OVERFLOW_BIT) { in iscsit_build_rsp_pdu()
3194 hdr->residual_count = cpu_to_be32(cmd->se_cmd.residual_count); in iscsit_build_rsp_pdu()
3195 } else if (cmd->se_cmd.se_cmd_flags & SCF_UNDERFLOW_BIT) { in iscsit_build_rsp_pdu()
3197 hdr->residual_count = cpu_to_be32(cmd->se_cmd.residual_count); in iscsit_build_rsp_pdu()
3200 hdr->cmd_status = cmd->se_cmd.scsi_status; in iscsit_build_rsp_pdu()
3210 cmd->init_task_tag, cmd->stat_sn, cmd->se_cmd.scsi_status, in iscsit_build_rsp_pdu()
3211 cmd->se_cmd.scsi_status, conn->cid); in iscsit_build_rsp_pdu()
3227 if (cmd->se_cmd.sense_buffer && in iscsit_send_response()
3228 ((cmd->se_cmd.se_cmd_flags & SCF_TRANSPORT_TASK_SENSE) || in iscsit_send_response()
3229 (cmd->se_cmd.se_cmd_flags & SCF_EMULATED_TASK_SENSE))) { in iscsit_send_response()
3230 put_unaligned_be16(cmd->se_cmd.scsi_sense_length, cmd->sense_buffer); in iscsit_send_response()
3231 cmd->se_cmd.scsi_sense_length += sizeof (__be16); in iscsit_send_response()
3233 padding = -(cmd->se_cmd.scsi_sense_length) & 3; in iscsit_send_response()
3234 hton24(hdr->dlength, (u32)cmd->se_cmd.scsi_sense_length); in iscsit_send_response()
3236 data_buf_len = cmd->se_cmd.scsi_sense_length + padding; in iscsit_send_response()
3240 cmd->se_cmd.scsi_sense_length, 0, padding); in iscsit_send_response()
3247 cmd->se_cmd.scsi_sense_length); in iscsit_send_response()
3275 struct se_tmr_req *se_tmr = cmd->se_cmd.se_tmr_req; in iscsit_build_task_mgt_rsp()
4078 struct se_cmd *se_cmd = &cmd->se_cmd; in iscsit_release_commands_from_conn() local
4080 if (se_cmd->se_tfo != NULL) { in iscsit_release_commands_from_conn()
4081 spin_lock(&se_cmd->t_state_lock); in iscsit_release_commands_from_conn()
4082 se_cmd->transport_state |= CMD_T_FABRIC_STOP; in iscsit_release_commands_from_conn()
4083 spin_unlock(&se_cmd->t_state_lock); in iscsit_release_commands_from_conn()