Lines Matching refs:raid

309 	struct MR_LD_RAID         *raid;  in MR_ValidateMapInfo()  local
360 raid = MR_LdRaidGet(ld, drv_map); in MR_ValidateMapInfo()
361 le32_to_cpus((u32 *)&raid->capability); in MR_ValidateMapInfo()
374 struct MR_LD_RAID *raid = MR_LdRaidGet(ld, map); in MR_GetSpanBlock() local
377 for (span = 0; span < raid->spanDepth; span++, pSpanBlock++) { in MR_GetSpanBlock()
391 blk = (blk + le64_to_cpu(quad->offsetInSpan)) << raid->stripeShift; in MR_GetSpanBlock()
423 struct MR_LD_RAID *raid = MR_LdRaidGet(ld, map); in mr_spanset_get_span_block() local
438 for (span = 0; span < raid->spanDepth; span++) in mr_spanset_get_span_block()
456 << raid->stripeShift; in mr_spanset_get_span_block()
486 struct MR_LD_RAID *raid = MR_LdRaidGet(ld, map); in get_row_from_strip() local
505 for (span = 0, span_offset = 0; span < raid->spanDepth; span++) in get_row_from_strip()
543 struct MR_LD_RAID *raid = MR_LdRaidGet(ld, map); in get_strip_from_row() local
558 for (span = 0; span < raid->spanDepth; span++) in get_strip_from_row()
604 struct MR_LD_RAID *raid = MR_LdRaidGet(ld, map); in get_arm_from_strip() local
621 for (span = 0, span_offset = 0; span < raid->spanDepth; span++) in get_arm_from_strip()
647 struct MR_LD_RAID *raid = MR_LdRaidGet(ld, map); in get_arm() local
651 switch (raid->level) { in get_arm()
691 struct MR_LD_RAID *raid = MR_LdRaidGet(ld, map); in mr_spanset_get_phy_params() local
708 if (raid->level == 6) { in mr_spanset_get_phy_params()
732 (raid->level == 1) && in mr_spanset_get_phy_params()
740 if ((raid->level >= 5) && in mr_spanset_get_phy_params()
743 (raid->regTypeReqOnRead != REGION_TYPE_UNUSED)))) in mr_spanset_get_phy_params()
745 else if (raid->level == 1) { in mr_spanset_get_phy_params()
792 struct MR_LD_RAID *raid = MR_LdRaidGet(ld, map); in MR_GetPhyParams() local
803 row = mega_div64_32(stripRow, raid->rowDataSize); in MR_GetPhyParams()
805 if (raid->level == 6) { in MR_GetPhyParams()
807 u32 logArm = mega_mod64(stripRow, raid->rowDataSize); in MR_GetPhyParams()
810 if (raid->rowSize == 0) in MR_GetPhyParams()
813 rowMod = mega_mod64(row, raid->rowSize); in MR_GetPhyParams()
814 armQ = raid->rowSize-1-rowMod; /* index of Q drive */ in MR_GetPhyParams()
816 if (arm >= raid->rowSize) /* handle wrap condition */ in MR_GetPhyParams()
817 arm -= raid->rowSize; in MR_GetPhyParams()
820 if (raid->modFactor == 0) in MR_GetPhyParams()
823 raid->modFactor), in MR_GetPhyParams()
827 if (raid->spanDepth == 1) { in MR_GetPhyParams()
829 *pdBlock = row << raid->stripeShift; in MR_GetPhyParams()
846 (raid->level == 1) && in MR_GetPhyParams()
854 if ((raid->level >= 5) && in MR_GetPhyParams()
857 (raid->regTypeReqOnRead != REGION_TYPE_UNUSED)))) in MR_GetPhyParams()
859 else if (raid->level == 1) { in MR_GetPhyParams()
904 struct MR_LD_RAID *raid = MR_LdRaidGet(ld, map); in mr_get_phy_params_r56_rmw() local
910 dataArms = raid->rowDataSize; in mr_get_phy_params_r56_rmw()
911 arms = raid->rowSize; in mr_get_phy_params_r56_rmw()
922 if (raid->spanDepth == 1) { in mr_get_phy_params_r56_rmw()
930 if (raid->level == 6) { in mr_get_phy_params_r56_rmw()
973 struct MR_LD_RAID *raid; in MR_BuildRaidContext() local
997 raid = MR_LdRaidGet(ld, map); in MR_BuildRaidContext()
999 io_info->ra_capable = raid->capability.ra_capable; in MR_BuildRaidContext()
1005 if (raid->rowDataSize == 0) { in MR_BuildRaidContext()
1020 stripSize = 1 << raid->stripeShift; in MR_BuildRaidContext()
1023 io_info->data_arms = raid->rowDataSize; in MR_BuildRaidContext()
1028 start_strip = ldStartBlock >> raid->stripeShift; in MR_BuildRaidContext()
1032 endStrip = endLba >> raid->stripeShift; in MR_BuildRaidContext()
1045 if (raid->spanDepth == 1) { in MR_BuildRaidContext()
1047 *pdBlock = start_row << raid->stripeShift; in MR_BuildRaidContext()
1063 start_row = mega_div64_32(start_strip, raid->rowDataSize); in MR_BuildRaidContext()
1064 endRow = mega_div64_32(endStrip, raid->rowDataSize); in MR_BuildRaidContext()
1073 regStart = start_row << raid->stripeShift; in MR_BuildRaidContext()
1077 io_info->do_fp_rlbypass = raid->capability.fpBypassRegionLock; in MR_BuildRaidContext()
1080 if (raid->capability.fpCapable) { in MR_BuildRaidContext()
1082 io_info->fpOkForIo = (raid->capability.fpReadCapable && in MR_BuildRaidContext()
1084 raid->capability. in MR_BuildRaidContext()
1087 io_info->fpOkForIo = (raid->capability.fpWriteCapable && in MR_BuildRaidContext()
1089 raid->capability. in MR_BuildRaidContext()
1106 if (start_strip == (start_row + 1) * raid->rowDataSize - 1) { in MR_BuildRaidContext()
1115 regSize += (numRows-2) << raid->stripeShift; in MR_BuildRaidContext()
1118 if (endStrip == endRow*raid->rowDataSize) in MR_BuildRaidContext()
1139 regSize += (numRows-2) << raid->stripeShift; in MR_BuildRaidContext()
1149 cpu_to_le16(raid->fpIoTimeoutForLd ? in MR_BuildRaidContext()
1150 raid->fpIoTimeoutForLd : in MR_BuildRaidContext()
1154 raid->regTypeReqOnRead : raid->regTypeReqOnWrite; in MR_BuildRaidContext()
1157 REGION_TYPE_SHARED_READ : raid->regTypeReqOnWrite; in MR_BuildRaidContext()
1158 pRAID_Context->virtual_disk_tgt_id = raid->targetId; in MR_BuildRaidContext()
1161 pRAID_Context->config_seq_num = raid->seqNum; in MR_BuildRaidContext()
1163 *raidLUN = raid->LUN; in MR_BuildRaidContext()
1166 if (fusion->r56_div_offload && (raid->level >= 5) && !isRead) { in MR_BuildRaidContext()
1222 struct MR_LD_RAID *raid; in mr_update_span_set() local
1233 raid = MR_LdRaidGet(ld, map); in mr_update_span_set()
1235 for (span = 0; span < raid->spanDepth; span++) { in mr_update_span_set()
1248 count < raid->spanDepth; count++) { in mr_update_span_set()
1269 ((span_row << raid->stripeShift) in mr_update_span_set()
1289 ((span_row << raid->stripeShift) in mr_update_span_set()
1311 if (span == raid->spanDepth) in mr_update_span_set()
1322 struct MR_LD_RAID *raid; in mr_update_load_balance_params() local
1334 raid = MR_LdRaidGet(ld, drv_map); in mr_update_load_balance_params()
1335 if ((raid->level != 1) || in mr_update_load_balance_params()
1336 (raid->ldState != MR_LD_STATE_OPTIMAL)) { in mr_update_load_balance_params()
1349 struct MR_LD_RAID *raid; in megasas_get_best_arm_pd() local
1364 raid = MR_LdRaidGet(ld, drv_map); in megasas_get_best_arm_pd()
1366 SPAN_ROW_SIZE(drv_map, ld, span) : raid->rowSize; in megasas_get_best_arm_pd()