Lines Matching refs:raid
267 struct MR_LD_RAID *raid; in MR_ValidateMapInfo() local
308 raid = MR_LdRaidGet(ld, drv_map); in MR_ValidateMapInfo()
309 le32_to_cpus((u32 *)&raid->capability); in MR_ValidateMapInfo()
320 struct MR_LD_RAID *raid = MR_LdRaidGet(ld, map); in MR_GetSpanBlock() local
323 for (span = 0; span < raid->spanDepth; span++, pSpanBlock++) { in MR_GetSpanBlock()
338 blk = (blk + le64_to_cpu(quad->offsetInSpan)) << raid->stripeShift; in MR_GetSpanBlock()
364 struct MR_LD_RAID *raid; in getSpanInfo() local
374 raid = MR_LdRaidGet(ld, map); in getSpanInfo()
376 ld, raid->spanDepth); in getSpanInfo()
377 for (span = 0; span < raid->spanDepth; span++) in getSpanInfo()
408 for (span = 0; span < raid->spanDepth; span++) { in getSpanInfo()
455 struct MR_LD_RAID *raid = MR_LdRaidGet(ld, map); in mr_spanset_get_span_block() local
470 for (span = 0; span < raid->spanDepth; span++) in mr_spanset_get_span_block()
488 << raid->stripeShift; in mr_spanset_get_span_block()
518 struct MR_LD_RAID *raid = MR_LdRaidGet(ld, map); in get_row_from_strip() local
537 for (span = 0, span_offset = 0; span < raid->spanDepth; span++) in get_row_from_strip()
587 struct MR_LD_RAID *raid = MR_LdRaidGet(ld, map); in get_strip_from_row() local
602 for (span = 0; span < raid->spanDepth; span++) in get_strip_from_row()
648 struct MR_LD_RAID *raid = MR_LdRaidGet(ld, map); in get_arm_from_strip() local
665 for (span = 0, span_offset = 0; span < raid->spanDepth; span++) in get_arm_from_strip()
695 struct MR_LD_RAID *raid = MR_LdRaidGet(ld, map); in get_arm() local
699 switch (raid->level) { in get_arm()
739 struct MR_LD_RAID *raid = MR_LdRaidGet(ld, map); in mr_spanset_get_phy_params() local
756 if (raid->level == 6) { in mr_spanset_get_phy_params()
779 if ((raid->level >= 5) && in mr_spanset_get_phy_params()
782 (raid->regTypeReqOnRead != REGION_TYPE_UNUSED)))) in mr_spanset_get_phy_params()
784 else if (raid->level == 1) { in mr_spanset_get_phy_params()
820 struct MR_LD_RAID *raid = MR_LdRaidGet(ld, map); in MR_GetPhyParams() local
832 row = mega_div64_32(stripRow, raid->rowDataSize); in MR_GetPhyParams()
834 if (raid->level == 6) { in MR_GetPhyParams()
836 u32 logArm = mega_mod64(stripRow, raid->rowDataSize); in MR_GetPhyParams()
839 if (raid->rowSize == 0) in MR_GetPhyParams()
842 rowMod = mega_mod64(row, raid->rowSize); in MR_GetPhyParams()
843 armQ = raid->rowSize-1-rowMod; /* index of Q drive */ in MR_GetPhyParams()
845 if (arm >= raid->rowSize) /* handle wrap condition */ in MR_GetPhyParams()
846 arm -= raid->rowSize; in MR_GetPhyParams()
849 if (raid->modFactor == 0) in MR_GetPhyParams()
852 raid->modFactor), in MR_GetPhyParams()
856 if (raid->spanDepth == 1) { in MR_GetPhyParams()
858 *pdBlock = row << raid->stripeShift; in MR_GetPhyParams()
875 if ((raid->level >= 5) && in MR_GetPhyParams()
878 (raid->regTypeReqOnRead != REGION_TYPE_UNUSED)))) in MR_GetPhyParams()
880 else if (raid->level == 1) { in MR_GetPhyParams()
912 struct MR_LD_RAID *raid; in MR_BuildRaidContext() local
935 raid = MR_LdRaidGet(ld, map); in MR_BuildRaidContext()
941 if (raid->rowDataSize == 0) { in MR_BuildRaidContext()
956 stripSize = 1 << raid->stripeShift; in MR_BuildRaidContext()
963 start_strip = ldStartBlock >> raid->stripeShift; in MR_BuildRaidContext()
967 endStrip = endLba >> raid->stripeShift; in MR_BuildRaidContext()
980 if (raid->spanDepth == 1) { in MR_BuildRaidContext()
982 *pdBlock = start_row << raid->stripeShift; in MR_BuildRaidContext()
1009 start_row = mega_div64_32(start_strip, raid->rowDataSize); in MR_BuildRaidContext()
1010 endRow = mega_div64_32(endStrip, raid->rowDataSize); in MR_BuildRaidContext()
1019 regStart = start_row << raid->stripeShift; in MR_BuildRaidContext()
1024 if (raid->capability.fpCapable) { in MR_BuildRaidContext()
1026 io_info->fpOkForIo = (raid->capability.fpReadCapable && in MR_BuildRaidContext()
1028 raid->capability. in MR_BuildRaidContext()
1031 io_info->fpOkForIo = (raid->capability.fpWriteCapable && in MR_BuildRaidContext()
1033 raid->capability. in MR_BuildRaidContext()
1050 if (start_strip == (start_row + 1) * raid->rowDataSize - 1) { in MR_BuildRaidContext()
1059 regSize += (numRows-2) << raid->stripeShift; in MR_BuildRaidContext()
1062 if (endStrip == endRow*raid->rowDataSize) in MR_BuildRaidContext()
1083 regSize += (numRows-2) << raid->stripeShift; in MR_BuildRaidContext()
1093 cpu_to_le16(raid->fpIoTimeoutForLd ? in MR_BuildRaidContext()
1094 raid->fpIoTimeoutForLd : in MR_BuildRaidContext()
1098 raid->regTypeReqOnRead : raid->regTypeReqOnWrite; in MR_BuildRaidContext()
1101 REGION_TYPE_SHARED_READ : raid->regTypeReqOnWrite; in MR_BuildRaidContext()
1102 pRAID_Context->VirtualDiskTgtId = raid->targetId; in MR_BuildRaidContext()
1105 pRAID_Context->configSeqNum = raid->seqNum; in MR_BuildRaidContext()
1107 *raidLUN = raid->LUN; in MR_BuildRaidContext()
1165 struct MR_LD_RAID *raid; in mr_update_span_set() local
1176 raid = MR_LdRaidGet(ld, map); in mr_update_span_set()
1178 for (span = 0; span < raid->spanDepth; span++) { in mr_update_span_set()
1191 count < raid->spanDepth; count++) { in mr_update_span_set()
1212 ((span_row << raid->stripeShift) in mr_update_span_set()
1232 ((span_row << raid->stripeShift) in mr_update_span_set()
1254 if (span == raid->spanDepth) in mr_update_span_set()
1269 struct MR_LD_RAID *raid; in mr_update_load_balance_params() local
1281 raid = MR_LdRaidGet(ld, drv_map); in mr_update_load_balance_params()
1282 if ((raid->level != 1) || in mr_update_load_balance_params()
1283 (raid->ldState != MR_LD_STATE_OPTIMAL)) { in mr_update_load_balance_params()
1295 struct MR_LD_RAID *raid; in megasas_get_best_arm_pd() local
1313 raid = MR_LdRaidGet(ld, drv_map); in megasas_get_best_arm_pd()
1315 SPAN_ROW_SIZE(drv_map, ld, span) : raid->rowSize; in megasas_get_best_arm_pd()