Lines Matching refs:ld

66 MR_GetPhyParams(struct mrsas_softc *sc, u_int32_t ld,
72 u_int16_t MR_GetLDTgtId(u_int32_t ld, MR_DRV_RAID_MAP_ALL * map);
78 MR_GetSpanBlock(u_int32_t ld, u_int64_t row, u_int64_t *span_blk,
90 MR_LdSpanArrayGet(u_int32_t ld, u_int32_t span,
97 MR_LdSpanPtrGet(u_int32_t ld, u_int32_t span,
100 MR_LdDataArmGet(u_int32_t ld, u_int32_t armIdx,
103 MR_LdSpanInfoGet(u_int32_t ld,
105 MR_LD_RAID *MR_LdRaidGet(u_int32_t ld, MR_DRV_RAID_MAP_ALL * map);
115 mr_spanset_get_phy_params(struct mrsas_softc *sc, u_int32_t ld,
119 get_row_from_strip(struct mrsas_softc *sc, u_int32_t ld,
123 u_int32_t ld, u_int64_t row, u_int64_t *span_blk,
126 get_arm(struct mrsas_softc *sc, u_int32_t ld, u_int8_t span,
133 #define SPAN_ROW_SIZE(map, ld, index_) MR_LdSpanPtrGet(ld, index_, map)->spanRowSize
134 #define SPAN_ROW_DATA_SIZE(map_, ld, index_) \
135 MR_LdSpanPtrGet(ld, index_, map)->spanRowDataSize
193 MR_LdRaidGet(u_int32_t ld, MR_DRV_RAID_MAP_ALL * map)
195 return (&map->raidMap.ldSpanMap[ld].ldRaid);
199 MR_GetLDTgtId(u_int32_t ld, MR_DRV_RAID_MAP_ALL * map)
201 return (map->raidMap.ldSpanMap[ld].ldRaid.targetId);
205 MR_LdSpanArrayGet(u_int32_t ld, u_int32_t span, MR_DRV_RAID_MAP_ALL * map)
207 return map->raidMap.ldSpanMap[ld].spanBlock[span].span.arrayRef;
211 MR_LdDataArmGet(u_int32_t ld, u_int32_t armIdx, MR_DRV_RAID_MAP_ALL * map)
213 return map->raidMap.ldSpanMap[ld].dataArmMap[armIdx];
229 MR_LdSpanPtrGet(u_int32_t ld, u_int32_t span, MR_DRV_RAID_MAP_ALL * map)
231 return &map->raidMap.ldSpanMap[ld].spanBlock[span].span;
235 MR_LdSpanInfoGet(u_int32_t ld, MR_DRV_RAID_MAP_ALL * map)
237 return &map->raidMap.ldSpanMap[ld].spanBlock[0];
250 u_int32_t ld, ldBlockSize = MRSAS_SCSIBLOCKSIZE;
252 ld = MR_TargetIdToLdGet(ldTgtId, map);
257 if (ld >= MAX_LOGICAL_DRIVES)
260 raid = MR_LdRaidGet(ld, map);
376 device_printf(sc->mrsas_dev, "map size %x not matching ld count\n", expected_map_size);
394 * ldSpanInfo: ld map span info per HBA instance
409 u_int16_t ld;
412 ld = MR_TargetIdToLdGet(ldCount, map);
413 if (ld >= MAX_LOGICAL_DRIVES) {
416 raid = MR_LdRaidGet(ld, map);
417 printf("LD %x: span_depth=%x\n", ld, raid->spanDepth);
420 map->raidMap.ldSpanMap[ld].spanBlock[span].
423 span_set = &(ldSpanInfo[ld].span_set[element]);
444 if (map->raidMap.ldSpanMap[ld].spanBlock[span].
446 quad = &map->raidMap.ldSpanMap[ld].
469 * ld: Logical drive number
479 mr_spanset_get_span_block(struct mrsas_softc *sc, u_int32_t ld, u_int64_t row,
482 MR_LD_RAID *raid = MR_LdRaidGet(ld, map);
489 span_set = &(ldSpanInfo[ld].span_set[info]);
497 if (map->raidMap.ldSpanMap[ld].spanBlock[span].
499 quad = &map->raidMap.ldSpanMap[ld].
532 * ld: Logical drive number
541 u_int32_t ld, u_int64_t strip, MR_DRV_RAID_MAP_ALL * map)
543 MR_LD_RAID *raid = MR_LdRaidGet(ld, map);
550 span_set = &(ldSpanInfo[ld].span_set[info]);
563 if (map->raidMap.ldSpanMap[ld].spanBlock[span].
590 * ld: Logical drive number
599 u_int32_t ld, u_int64_t row, MR_DRV_RAID_MAP_ALL * map)
601 MR_LD_RAID *raid = MR_LdRaidGet(ld, map);
609 span_set = &(ldSpanInfo[ld].span_set[info]);
617 if (map->raidMap.ldSpanMap[ld].spanBlock[span].
619 quad = &map->raidMap.ldSpanMap[ld].
637 "strip for ld=%x, row=%lx\n", ld, (long unsigned int)row);
657 u_int32_t ld, u_int64_t strip, MR_DRV_RAID_MAP_ALL * map)
659 MR_LD_RAID *raid = MR_LdRaidGet(ld, map);
665 span_set = &(ldSpanInfo[ld].span_set[info]);
677 if (map->raidMap.ldSpanMap[ld].spanBlock[span].
685 "for ld=0x%x strip=0x%lx arm is 0x%x\n", ld,
691 " for ld=%x strip=%lx\n", ld, (long unsigned int)strip);
699 get_arm(struct mrsas_softc *sc, u_int32_t ld, u_int8_t span, u_int64_t stripe,
702 MR_LD_RAID *raid = MR_LdRaidGet(ld, map);
711 arm = mega_mod64(stripe, SPAN_ROW_SIZE(map, ld, span));
715 arm = get_arm_from_strip(sc, ld, stripe, map);
730 * ld - Logical drive number
738 mr_spanset_get_phy_params(struct mrsas_softc *sc, u_int32_t ld, u_int64_t stripRow,
742 MR_LD_RAID *raid = MR_LdRaidGet(ld, map);
757 logArm = get_arm_from_strip(sc, ld, stripRow, map);
758 rowMod = mega_mod64(row, SPAN_ROW_SIZE(map, ld, span));
759 armQ = SPAN_ROW_SIZE(map, ld, span) - 1 - rowMod;
761 if (arm >= SPAN_ROW_SIZE(map, ld, span))
762 arm -= SPAN_ROW_SIZE(map, ld, span);
766 physArm = get_arm(sc, ld, span, stripRow, map);
769 arRef = MR_LdSpanArrayGet(ld, span, map);
786 *pdBlock += stripRef + MR_LdSpanPtrGet(ld, span, map)->startBlk;
804 u_int32_t ld, stripSize, stripe_mask;
826 ld = MR_TargetIdToLdGet(ldTgtId, map);
827 raid = MR_LdRaidGet(ld, map);
830 if (MR_LdSpanPtrGet(ld, 0, map)->spanRowDataSize == 0)
837 MR_LdSpanPtrGet(ld, 0, map)->spanRowDataSize);
853 start_row = get_row_from_strip(sc, ld, start_strip, map);
854 endRow = get_row_from_strip(sc, ld, endStrip, map);
859 startlba_span = (u_int8_t)mr_spanset_get_span_block(sc, ld, start_row,
939 if (start_strip == (get_strip_from_row(sc, ld, start_row, map) +
940 SPAN_ROW_DATA_SIZE(map, ld, startlba_span) - 1)) {
953 if (endStrip == get_strip_from_row(sc, ld, endRow, map))
974 mr_spanset_get_phy_params(sc, ld, start_strip,
976 MR_GetPhyParams(sc, ld, start_strip,
985 mr_spanset_get_phy_params(sc, ld, start_strip + stripIdx,
987 MR_GetPhyParams(sc, ld, start_strip + stripIdx,
995 get_arm_from_strip(sc, ld, start_strip, map);
1019 u_int16_t ld;
1022 ld = MR_TargetIdToLdGet(ldCount, map);
1023 if (ld >= MAX_LOGICAL_DRIVES)
1025 raid = MR_LdRaidGet(ld, map);
1028 if (map->raidMap.ldSpanMap[ld].spanBlock[span].
1032 span_set = &(ldSpanInfo[ld].span_set[element]);
1033 quad = &map->raidMap.ldSpanMap[ld].
1040 if (map->raidMap.ldSpanMap[ld].spanBlock[count].
1044 MR_LdSpanPtrGet(ld, count, map)->spanRowDataSize;
1047 MR_LdSpanPtrGet(ld, count, map)->spanRowDataSize);
1070 span_set_prev = &(ldSpanInfo[ld].span_set[element - 1]);
1114 u_int16_t ld;
1121 ld = MR_TargetIdToLdGet(ldCount, drv_map);
1122 if (ld >= MAX_LOGICAL_DRIVES_EXT) {
1126 raid = MR_LdRaidGet(ld, drv_map);
1155 u_int32_t ld;
1163 ld = MR_TargetIdToLdGet(io_info->ldTgtId, local_map_ptr);
1164 raid = MR_LdRaidGet(ld, local_map_ptr);
1338 u_int16_t pend0, pend1, ld;
1351 ld = MR_TargetIdToLdGet(io_info->ldTgtId, drv_map);
1352 raid = MR_LdRaidGet(ld, drv_map);
1354 SPAN_ROW_SIZE(drv_map, ld, span) : raid->rowSize;
1356 arRef = MR_LdSpanArrayGet(ld, span, drv_map);
1428 MR_GetPhyParams(struct mrsas_softc *sc, u_int32_t ld,
1433 MR_LD_RAID *raid = MR_LdRaidGet(ld, map);
1459 physArm = MR_LdDataArmGet(ld, mega_mod64(stripRow, raid->modFactor), map);
1466 span = (u_int8_t)MR_GetSpanBlock(ld, row, pdBlock, map, &error_code);
1472 arRef = MR_LdSpanArrayGet(ld, span, map);
1493 *pdBlock += stripRef + MR_LdSpanPtrGet(ld, span, map)->startBlk;
1511 MR_GetSpanBlock(u_int32_t ld, u_int64_t row, u_int64_t *span_blk,
1514 MR_SPAN_BLOCK_INFO *pSpanBlock = MR_LdSpanInfoGet(ld, map);
1516 MR_LD_RAID *raid = MR_LdRaidGet(ld, map);