Lines Matching refs:io_request

282 	memset(cmd->io_request, 0, MEGA_MPI2_RAID_DEFAULT_IO_FRAME_SIZE);  in megasas_return_cmd_fusion()
1015 cmd->io_request = in megasas_alloc_cmds_fusion()
1018 memset(cmd->io_request, 0, in megasas_alloc_cmds_fusion()
2299 if ((le16_to_cpu(cmd->io_request->IoFlags) & in megasas_make_sgl_fusion()
2302 cmd->io_request->ChainOffset = in megasas_make_sgl_fusion()
2306 cmd->io_request->ChainOffset = 0; in megasas_make_sgl_fusion()
2308 cmd->io_request->ChainOffset = in megasas_make_sgl_fusion()
2356 sgl_chain64 = (struct MPI25_IEEE_SGE_CHAIN64 *)&cmd->io_request->SGL; in megasas_make_sgl()
2357 if ((le16_to_cpu(cmd->io_request->IoFlags) & in megasas_make_sgl()
2382 megasas_set_pd_lba(struct MPI2_RAID_SCSI_IO_REQUEST *io_request, u8 cdb_len, in megasas_set_pd_lba() argument
2389 u8 *cdb = io_request->CDB.CDB32; in megasas_set_pd_lba()
2397 memset(cdb, 0, sizeof(io_request->CDB.CDB32)); in megasas_set_pd_lba()
2418 io_request->CDB.EEDP32.PrimaryReferenceTag = in megasas_set_pd_lba()
2420 io_request->CDB.EEDP32.PrimaryApplicationTagMask = cpu_to_be16(0xffff); in megasas_set_pd_lba()
2421 io_request->IoFlags = cpu_to_le16(32); /* Specify 32-byte cdb */ in megasas_set_pd_lba()
2431 io_request->EEDPFlags = cpu_to_le16( in megasas_set_pd_lba()
2439 io_request->EEDPFlags = cpu_to_le16( in megasas_set_pd_lba()
2443 io_request->Control |= cpu_to_le32((0x4 << 26)); in megasas_set_pd_lba()
2444 io_request->EEDPBlockSize = cpu_to_le32(scp->device->sector_size); in megasas_set_pd_lba()
2461 memset(cdb, 0, sizeof(io_request->CDB.CDB32)); in megasas_set_pd_lba()
2472 io_request->IoFlags = cpu_to_le16(10); /* Specify 10-byte cdb */ in megasas_set_pd_lba()
2497 memset(cdb, 0, sizeof(io_request->CDB.CDB32)); in megasas_set_pd_lba()
2510 io_request->IoFlags = cpu_to_le16(16); /* Specify 16-byte cdb */ in megasas_set_pd_lba()
2596 SET_STREAM_DETECTED(cmd->io_request->RaidContext.raid_context_g35); in megasas_stream_detect()
2731 struct MPI2_RAID_SCSI_IO_REQUEST *io_request; in megasas_build_ldio_fusion() local
2746 io_request = cmd->io_request; in megasas_build_ldio_fusion()
2747 rctx = &io_request->RaidContext.raid_context; in megasas_build_ldio_fusion()
2748 rctx_g35 = &io_request->RaidContext.raid_context_g35; in megasas_build_ldio_fusion()
2814 io_request->DataLength = cpu_to_le32(scsi_buff_len); in megasas_build_ldio_fusion()
2880 megasas_set_raidflag_cpu_affinity(fusion, &io_request->RaidContext, in megasas_build_ldio_fusion()
2889 megasas_set_pd_lba(io_request, scp->cmd_len, &io_info, scp, in megasas_build_ldio_fusion()
2891 io_request->Function = MPI2_FUNCTION_SCSI_IO_REQUEST; in megasas_build_ldio_fusion()
2898 io_request->IoFlags |= cpu_to_le16(MPI25_SAS_DEVICE0_FLAGS_ENABLED_FAST_PATH); in megasas_build_ldio_fusion()
2906 io_request->IoFlags |= in megasas_build_ldio_fusion()
2939 io_request->DevHandle = io_info.devHandle; in megasas_build_ldio_fusion()
2942 memcpy(io_request->LUN, raidLUN, 8); in megasas_build_ldio_fusion()
2965 io_request->Function = MEGASAS_MPI2_FUNCTION_LD_IO_REQUEST; in megasas_build_ldio_fusion()
2966 io_request->DevHandle = cpu_to_le16(device_id); in megasas_build_ldio_fusion()
2983 struct MPI2_RAID_SCSI_IO_REQUEST *io_request; in megasas_build_ld_nonrw_fusion() local
2994 io_request = cmd->io_request; in megasas_build_ld_nonrw_fusion()
2997 io_request->DataLength = cpu_to_le32(scsi_bufflen(scmd)); in megasas_build_ld_nonrw_fusion()
2999 pRAID_Context = &io_request->RaidContext.raid_context; in megasas_build_ld_nonrw_fusion()
3020 io_request->Function = MEGASAS_MPI2_FUNCTION_LD_IO_REQUEST; in megasas_build_ld_nonrw_fusion()
3021 io_request->DevHandle = cpu_to_le16(device_id); in megasas_build_ld_nonrw_fusion()
3022 io_request->LUN[1] = scmd->device->lun; in megasas_build_ld_nonrw_fusion()
3051 memcpy(io_request->LUN, raid->LUN, 8); in megasas_build_ld_nonrw_fusion()
3054 io_request->Function = MPI2_FUNCTION_SCSI_IO_REQUEST; in megasas_build_ld_nonrw_fusion()
3055 io_request->DevHandle = devHandle; in megasas_build_ld_nonrw_fusion()
3074 struct MPI2_RAID_SCSI_IO_REQUEST *io_request; in megasas_build_syspd_fusion() local
3091 io_request = cmd->io_request; in megasas_build_syspd_fusion()
3093 pRAID_Context = &io_request->RaidContext.raid_context; in megasas_build_syspd_fusion()
3097 io_request->DataLength = cpu_to_le32(scsi_bufflen(scmd)); in megasas_build_syspd_fusion()
3098 io_request->LUN[1] = scmd->device->lun; in megasas_build_syspd_fusion()
3117 io_request->DevHandle = in megasas_build_syspd_fusion()
3120 io_request->RaidContext.raid_context_g35.routing_flags |= in megasas_build_syspd_fusion()
3122 io_request->RaidContext.raid_context_g35.nseg_type |= in megasas_build_syspd_fusion()
3124 io_request->RaidContext.raid_context_g35.nseg_type |= in megasas_build_syspd_fusion()
3138 io_request->DevHandle = cpu_to_le16(0xFFFF); in megasas_build_syspd_fusion()
3147 io_request->DevHandle = in megasas_build_syspd_fusion()
3150 io_request->DevHandle = cpu_to_le16(0xFFFF); in megasas_build_syspd_fusion()
3154 cmd->request_desc->SCSIIO.DevHandle = io_request->DevHandle; in megasas_build_syspd_fusion()
3160 io_request->Function = MEGASAS_MPI2_FUNCTION_LD_IO_REQUEST; in megasas_build_syspd_fusion()
3171 io_request->Function = MPI2_FUNCTION_SCSI_IO_REQUEST; in megasas_build_syspd_fusion()
3178 io_request->IoFlags |= in megasas_build_syspd_fusion()
3204 struct MPI2_RAID_SCSI_IO_REQUEST *io_request = cmd->io_request; in megasas_build_io_fusion() local
3209 memset(io_request->LUN, 0x0, 8); in megasas_build_io_fusion()
3210 io_request->CDB.EEDP32.PrimaryReferenceTag = 0; in megasas_build_io_fusion()
3211 io_request->CDB.EEDP32.PrimaryApplicationTagMask = 0; in megasas_build_io_fusion()
3212 io_request->EEDPFlags = 0; in megasas_build_io_fusion()
3213 io_request->Control = 0; in megasas_build_io_fusion()
3214 io_request->EEDPBlockSize = 0; in megasas_build_io_fusion()
3215 io_request->ChainOffset = 0; in megasas_build_io_fusion()
3216 io_request->RaidContext.raid_context.raid_flags = 0; in megasas_build_io_fusion()
3217 io_request->RaidContext.raid_context.type = 0; in megasas_build_io_fusion()
3218 io_request->RaidContext.raid_context.nseg = 0; in megasas_build_io_fusion()
3220 memcpy(io_request->CDB.CDB32, scp->cmnd, scp->cmd_len); in megasas_build_io_fusion()
3225 io_request->IoFlags = cpu_to_le16(scp->cmd_len); in megasas_build_io_fusion()
3266 set_num_sge(&io_request->RaidContext.raid_context_g35, sge_count); in megasas_build_io_fusion()
3267 cpu_to_le16s(&io_request->RaidContext.raid_context_g35.routing_flags); in megasas_build_io_fusion()
3268 cpu_to_le16s(&io_request->RaidContext.raid_context_g35.nseg_type); in megasas_build_io_fusion()
3273 io_request->RaidContext.raid_context.num_sge = sge_count; in megasas_build_io_fusion()
3274 io_request->RaidContext.raid_context.num_sge_ext = in megasas_build_io_fusion()
3278 io_request->SGLFlags = cpu_to_le16(MPI2_SGE_FLAGS_64_BIT_ADDRESSING); in megasas_build_io_fusion()
3281 io_request->Control |= cpu_to_le32(MPI2_SCSIIO_CONTROL_WRITE); in megasas_build_io_fusion()
3283 io_request->Control |= cpu_to_le32(MPI2_SCSIIO_CONTROL_READ); in megasas_build_io_fusion()
3285 io_request->SGLOffset0 = in megasas_build_io_fusion()
3288 io_request->SenseBufferLowAddress = in megasas_build_io_fusion()
3290 io_request->SenseBufferLength = SCSI_SENSE_BUFFERSIZE; in megasas_build_io_fusion()
3324 memcpy(r1_cmd->io_request, cmd->io_request, in megasas_prepare_secondRaid1_IO()
3326 memcpy(&r1_cmd->io_request->SGL, &cmd->io_request->SGL, in megasas_prepare_secondRaid1_IO()
3329 r1_cmd->io_request->SenseBufferLowAddress = in megasas_prepare_secondRaid1_IO()
3339 r1_cmd->io_request->DevHandle = cmd->r1_alt_dev_handle; in megasas_prepare_secondRaid1_IO()
3340 r1_cmd->r1_alt_dev_handle = cmd->io_request->DevHandle; in megasas_prepare_secondRaid1_IO()
3341 cmd->io_request->RaidContext.raid_context_g35.flow_specific.peer_smid = in megasas_prepare_secondRaid1_IO()
3343 r1_cmd->io_request->RaidContext.raid_context_g35.flow_specific.peer_smid = in megasas_prepare_secondRaid1_IO()
3349 r1_cmd->io_request->RaidContext.raid_context_g35.span_arm = in megasas_prepare_secondRaid1_IO()
3350 cmd->io_request->RaidContext.raid_context_g35.span_arm + 1; in megasas_prepare_secondRaid1_IO()
3406 if (cmd->io_request->ChainOffset != 0 && in megasas_build_and_issue_cmd_fusion()
3407 cmd->io_request->ChainOffset != 0xF) in megasas_build_and_issue_cmd_fusion()
3409 "correct : %x\n", cmd->io_request->ChainOffset); in megasas_build_and_issue_cmd_fusion()
3460 rctx_g35 = &cmd->io_request->RaidContext.raid_context_g35; in megasas_complete_r1_command()
3468 data_length = cmd->io_request->DataLength; in megasas_complete_r1_command()
3475 rctx_g35 = &r1_cmd->io_request->RaidContext.raid_context_g35; in megasas_complete_r1_command()
3479 data_length = r1_cmd->io_request->DataLength; in megasas_complete_r1_command()
3591 cmd_fusion->io_request; in complete_cmd_fusion()
3602 cmd_fusion->io_request; in complete_cmd_fusion()
3911 io_req = cmd->io_request; in build_mpt_mfi_pass_thru()
4370 cmd_fusion->io_request; in megasas_refire_mgmt_cmd()
4561 mr_request = (struct MR_TASK_MANAGE_REQUEST *) cmd_fusion->io_request; in megasas_issue_tm()
5002 if (cmd_fusion->io_request->Function == in megasas_reset_fusion()