Lines Matching refs:raid

259 	struct MR_LD_RAID         *raid;  in MR_ValidateMapInfo()  local
300 raid = MR_LdRaidGet(ld, drv_map); in MR_ValidateMapInfo()
301 le32_to_cpus((u32 *)&raid->capability); in MR_ValidateMapInfo()
312 struct MR_LD_RAID *raid = MR_LdRaidGet(ld, map); in MR_GetSpanBlock() local
315 for (span = 0; span < raid->spanDepth; span++, pSpanBlock++) { in MR_GetSpanBlock()
330 blk = (blk + le64_to_cpu(quad->offsetInSpan)) << raid->stripeShift; in MR_GetSpanBlock()
356 struct MR_LD_RAID *raid; in getSpanInfo() local
366 raid = MR_LdRaidGet(ld, map); in getSpanInfo()
368 ld, raid->spanDepth); in getSpanInfo()
369 for (span = 0; span < raid->spanDepth; span++) in getSpanInfo()
400 for (span = 0; span < raid->spanDepth; span++) { in getSpanInfo()
447 struct MR_LD_RAID *raid = MR_LdRaidGet(ld, map); in mr_spanset_get_span_block() local
462 for (span = 0; span < raid->spanDepth; span++) in mr_spanset_get_span_block()
480 << raid->stripeShift; in mr_spanset_get_span_block()
510 struct MR_LD_RAID *raid = MR_LdRaidGet(ld, map); in get_row_from_strip() local
529 for (span = 0, span_offset = 0; span < raid->spanDepth; span++) in get_row_from_strip()
579 struct MR_LD_RAID *raid = MR_LdRaidGet(ld, map); in get_strip_from_row() local
594 for (span = 0; span < raid->spanDepth; span++) in get_strip_from_row()
640 struct MR_LD_RAID *raid = MR_LdRaidGet(ld, map); in get_arm_from_strip() local
657 for (span = 0, span_offset = 0; span < raid->spanDepth; span++) in get_arm_from_strip()
687 struct MR_LD_RAID *raid = MR_LdRaidGet(ld, map); in get_arm() local
691 switch (raid->level) { in get_arm()
731 struct MR_LD_RAID *raid = MR_LdRaidGet(ld, map); in mr_spanset_get_phy_params() local
750 if (raid->level == 6) { in mr_spanset_get_phy_params()
773 if ((raid->level >= 5) && in mr_spanset_get_phy_params()
775 (raid->regTypeReqOnRead != REGION_TYPE_UNUSED)))) in mr_spanset_get_phy_params()
777 else if (raid->level == 1) { in mr_spanset_get_phy_params()
813 struct MR_LD_RAID *raid = MR_LdRaidGet(ld, map); in MR_GetPhyParams() local
826 row = mega_div64_32(stripRow, raid->rowDataSize); in MR_GetPhyParams()
828 if (raid->level == 6) { in MR_GetPhyParams()
830 u32 logArm = mega_mod64(stripRow, raid->rowDataSize); in MR_GetPhyParams()
833 if (raid->rowSize == 0) in MR_GetPhyParams()
836 rowMod = mega_mod64(row, raid->rowSize); in MR_GetPhyParams()
837 armQ = raid->rowSize-1-rowMod; /* index of Q drive */ in MR_GetPhyParams()
839 if (arm >= raid->rowSize) /* handle wrap condition */ in MR_GetPhyParams()
840 arm -= raid->rowSize; in MR_GetPhyParams()
843 if (raid->modFactor == 0) in MR_GetPhyParams()
846 raid->modFactor), in MR_GetPhyParams()
850 if (raid->spanDepth == 1) { in MR_GetPhyParams()
852 *pdBlock = row << raid->stripeShift; in MR_GetPhyParams()
868 if ((raid->level >= 5) && in MR_GetPhyParams()
870 (raid->regTypeReqOnRead != REGION_TYPE_UNUSED)))) in MR_GetPhyParams()
872 else if (raid->level == 1) { in MR_GetPhyParams()
903 struct MR_LD_RAID *raid; in MR_BuildRaidContext() local
925 raid = MR_LdRaidGet(ld, map); in MR_BuildRaidContext()
931 if (raid->rowDataSize == 0) { in MR_BuildRaidContext()
946 stripSize = 1 << raid->stripeShift; in MR_BuildRaidContext()
953 start_strip = ldStartBlock >> raid->stripeShift; in MR_BuildRaidContext()
957 endStrip = endLba >> raid->stripeShift; in MR_BuildRaidContext()
970 if (raid->spanDepth == 1) { in MR_BuildRaidContext()
972 *pdBlock = start_row << raid->stripeShift; in MR_BuildRaidContext()
999 start_row = mega_div64_32(start_strip, raid->rowDataSize); in MR_BuildRaidContext()
1000 endRow = mega_div64_32(endStrip, raid->rowDataSize); in MR_BuildRaidContext()
1009 regStart = start_row << raid->stripeShift; in MR_BuildRaidContext()
1014 if (raid->capability.fpCapable) { in MR_BuildRaidContext()
1016 io_info->fpOkForIo = (raid->capability.fpReadCapable && in MR_BuildRaidContext()
1018 raid->capability. in MR_BuildRaidContext()
1021 io_info->fpOkForIo = (raid->capability.fpWriteCapable && in MR_BuildRaidContext()
1023 raid->capability. in MR_BuildRaidContext()
1040 if (start_strip == (start_row + 1) * raid->rowDataSize - 1) { in MR_BuildRaidContext()
1049 regSize += (numRows-2) << raid->stripeShift; in MR_BuildRaidContext()
1052 if (endStrip == endRow*raid->rowDataSize) in MR_BuildRaidContext()
1073 regSize += (numRows-2) << raid->stripeShift; in MR_BuildRaidContext()
1083 cpu_to_le16(raid->fpIoTimeoutForLd ? in MR_BuildRaidContext()
1084 raid->fpIoTimeoutForLd : in MR_BuildRaidContext()
1089 raid->regTypeReqOnRead : raid->regTypeReqOnWrite; in MR_BuildRaidContext()
1092 REGION_TYPE_SHARED_READ : raid->regTypeReqOnWrite; in MR_BuildRaidContext()
1093 pRAID_Context->VirtualDiskTgtId = raid->targetId; in MR_BuildRaidContext()
1096 pRAID_Context->configSeqNum = raid->seqNum; in MR_BuildRaidContext()
1098 *raidLUN = raid->LUN; in MR_BuildRaidContext()
1156 struct MR_LD_RAID *raid; in mr_update_span_set() local
1167 raid = MR_LdRaidGet(ld, map); in mr_update_span_set()
1169 for (span = 0; span < raid->spanDepth; span++) { in mr_update_span_set()
1182 count < raid->spanDepth; count++) { in mr_update_span_set()
1207 ((span_row << raid->stripeShift) in mr_update_span_set()
1227 ((span_row << raid->stripeShift) in mr_update_span_set()
1249 if (span == raid->spanDepth) in mr_update_span_set()
1264 struct MR_LD_RAID *raid; in mr_update_load_balance_params() local
1276 raid = MR_LdRaidGet(ld, drv_map); in mr_update_load_balance_params()
1277 if ((raid->level != 1) || in mr_update_load_balance_params()
1278 (raid->ldState != MR_LD_STATE_OPTIMAL)) { in mr_update_load_balance_params()
1290 struct MR_LD_RAID *raid; in megasas_get_best_arm_pd() local
1308 raid = MR_LdRaidGet(ld, drv_map); in megasas_get_best_arm_pd()
1310 SPAN_ROW_SIZE(drv_map, ld, span) : raid->rowSize; in megasas_get_best_arm_pd()