Lines Matching refs:raid

246 	MR_LD_RAID *raid;  in MR_LdBlockSizeGet()  local
257 raid = MR_LdRaidGet(ld, map); in MR_LdBlockSizeGet()
258 ldBlockSize = raid->logicalBlockLength; in MR_LdBlockSizeGet()
586 MR_LD_RAID *raid; in getSpanInfo() local
597 raid = MR_LdRaidGet(ld, map); in getSpanInfo()
598 printf("LD %x: span_depth=%x\n", ld, raid->spanDepth); in getSpanInfo()
599 for (span = 0; span < raid->spanDepth; span++) in getSpanInfo()
624 for (span = 0; span < raid->spanDepth; span++) { in getSpanInfo()
663 MR_LD_RAID *raid = MR_LdRaidGet(ld, map); in mr_spanset_get_span_block() local
677 for (span = 0; span < raid->spanDepth; span++) in mr_spanset_get_span_block()
698 << raid->stripeShift; in mr_spanset_get_span_block()
724 MR_LD_RAID *raid = MR_LdRaidGet(ld, map); in get_row_from_strip() local
743 for (span = 0, span_offset = 0; span < raid->spanDepth; span++) in get_row_from_strip()
781 MR_LD_RAID *raid = MR_LdRaidGet(ld, map); in get_strip_from_row() local
796 for (span = 0; span < raid->spanDepth; span++) in get_strip_from_row()
839 MR_LD_RAID *raid = MR_LdRaidGet(ld, map); in get_arm_from_strip() local
856 for (span = 0, span_offset = 0; span < raid->spanDepth; span++) in get_arm_from_strip()
881 MR_LD_RAID *raid = MR_LdRaidGet(ld, map); in get_arm() local
886 switch (raid->level) { in get_arm()
921 MR_LD_RAID *raid = MR_LdRaidGet(ld, map); in mr_spanset_get_phy_params() local
936 if (raid->level == 6) { in mr_spanset_get_phy_params()
955 if ((raid->level == 1) && !io_info->isRead) { in mr_spanset_get_phy_params()
962 if ((raid->level >= 5) && ((sc->device_id == MRSAS_TBOLT) || in mr_spanset_get_phy_params()
964 raid->regTypeReqOnRead != REGION_TYPE_UNUSED))) in mr_spanset_get_phy_params()
966 else if (raid->level == 1) { in mr_spanset_get_phy_params()
999 MR_LD_RAID *raid; in MR_BuildRaidContext() local
1023 raid = MR_LdRaidGet(ld, map); in MR_BuildRaidContext()
1026 io_info->raCapable = raid->capability.raCapable; in MR_BuildRaidContext()
1028 if (raid->rowDataSize == 0) { in MR_BuildRaidContext()
1040 stripSize = 1 << raid->stripeShift; in MR_BuildRaidContext()
1045 start_strip = ldStartBlock >> raid->stripeShift; in MR_BuildRaidContext()
1049 endStrip = endLba >> raid->stripeShift; in MR_BuildRaidContext()
1054 if (raid->spanDepth == 1) { in MR_BuildRaidContext()
1056 *pdBlock = start_row << raid->stripeShift; in MR_BuildRaidContext()
1084 start_row = mega_div64_32(start_strip, raid->rowDataSize); in MR_BuildRaidContext()
1085 endRow = mega_div64_32(endStrip, raid->rowDataSize); in MR_BuildRaidContext()
1094 regStart = start_row << raid->stripeShift; in MR_BuildRaidContext()
1098 if (raid->capability.fpCapable) { in MR_BuildRaidContext()
1100 io_info->fpOkForIo = (raid->capability.fpReadCapable && in MR_BuildRaidContext()
1102 raid->capability.fpReadAcrossStripe)); in MR_BuildRaidContext()
1104 io_info->fpOkForIo = (raid->capability.fpWriteCapable && in MR_BuildRaidContext()
1106 raid->capability.fpWriteAcrossStripe)); in MR_BuildRaidContext()
1120 if (start_strip == (start_row + 1) * raid->rowDataSize - 1) { in MR_BuildRaidContext()
1130 regSize += (numRows - 2) << raid->stripeShift; in MR_BuildRaidContext()
1133 if (endStrip == endRow * raid->rowDataSize) in MR_BuildRaidContext()
1149 regSize += (numRows - 2) << raid->stripeShift; in MR_BuildRaidContext()
1159 pRAID_Context->regLockFlags = (isRead) ? raid->regTypeReqOnRead : raid->regTypeReqOnWrite; in MR_BuildRaidContext()
1161 pRAID_Context->regLockFlags = (isRead) ? REGION_TYPE_SHARED_READ : raid->regTypeReqOnWrite; in MR_BuildRaidContext()
1162 pRAID_Context->VirtualDiskTgtId = raid->targetId; in MR_BuildRaidContext()
1165 pRAID_Context->configSeqNum = raid->seqNum; in MR_BuildRaidContext()
1185 (raid->writeMode == MR_RL_WRITE_BACK_MODE) && (raid->level <= 1) && in MR_BuildRaidContext()
1186 raid->capability.fpCacheBypassCapable) { in MR_BuildRaidContext()
1224 MR_LD_RAID *raid; in mr_update_span_set() local
1234 raid = MR_LdRaidGet(ld, map); in mr_update_span_set()
1236 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) * span_row_width) - 1; in mr_update_span_set()
1284 ((span_row << raid->stripeShift) * span_row_width) - 1; in mr_update_span_set()
1301 if (span == raid->spanDepth) in mr_update_span_set()
1326 MR_LD_RAID *raid; in mrsas_update_load_balance_params() local
1337 raid = MR_LdRaidGet(ld, drv_map); in mrsas_update_load_balance_params()
1338 le32_to_cpus(&raid->capability); in mrsas_update_load_balance_params()
1339 if ((raid->level != 1) || in mrsas_update_load_balance_params()
1340 (raid->ldState != MR_LD_STATE_OPTIMAL)) { in mrsas_update_load_balance_params()
1365 MR_LD_RAID *raid; in mrsas_set_pd_lba() local
1375 raid = MR_LdRaidGet(ld, local_map_ptr); in mrsas_set_pd_lba()
1376 if (raid->capability.ldPiMode == MR_PROT_INFO_TYPE_CONTROLLER) { in mrsas_set_pd_lba()
1547 MR_LD_RAID *raid; in mrsas_get_best_arm_pd() local
1564 raid = MR_LdRaidGet(ld, drv_map); in mrsas_get_best_arm_pd()
1566 SPAN_ROW_SIZE(drv_map, ld, span) : raid->rowSize; in mrsas_get_best_arm_pd()
1653 MR_LD_RAID *raid = MR_LdRaidGet(ld, map); in MR_GetPhyParams() local
1664 row = mega_div64_32(stripRow, raid->rowDataSize); in MR_GetPhyParams()
1666 if (raid->level == 6) { in MR_GetPhyParams()
1668 logArm = mega_mod64(stripRow, raid->rowDataSize); in MR_GetPhyParams()
1669 if (raid->rowSize == 0) in MR_GetPhyParams()
1671 rowMod = mega_mod64(row, raid->rowSize); /* get logical row mod */ in MR_GetPhyParams()
1672 armQ = raid->rowSize - 1 - rowMod; /* index of Q drive */ in MR_GetPhyParams()
1674 if (arm >= raid->rowSize) /* handle wrap condition */ in MR_GetPhyParams()
1675 arm -= raid->rowSize; in MR_GetPhyParams()
1678 if (raid->modFactor == 0) in MR_GetPhyParams()
1680 physArm = MR_LdDataArmGet(ld, mega_mod64(stripRow, raid->modFactor), map); in MR_GetPhyParams()
1683 if (raid->spanDepth == 1) { in MR_GetPhyParams()
1685 *pdBlock = row << raid->stripeShift; in MR_GetPhyParams()
1702 if ((raid->level == 1) && !io_info->isRead) { in MR_GetPhyParams()
1709 if ((raid->level >= 5) && ((sc->device_id == MRSAS_TBOLT) || in MR_GetPhyParams()
1711 raid->regTypeReqOnRead != REGION_TYPE_UNUSED))) in MR_GetPhyParams()
1713 else if (raid->level == 1) { in MR_GetPhyParams()
1754 MR_LD_RAID *raid = MR_LdRaidGet(ld, map); in MR_GetSpanBlock() local
1758 for (span = 0; span < raid->spanDepth; span++, pSpanBlock++) { in MR_GetSpanBlock()
1769 blk = (blk + quad->offsetInSpan) << raid->stripeShift; in MR_GetSpanBlock()