Lines Matching defs:instance
64 static u8 mr_spanset_get_phy_params(struct megasas_instance *instance, u32 ld,
67 static u64 get_row_from_strip(struct megasas_instance *instance, u32 ld,
157 static int MR_PopulateDrvRaidMap(struct megasas_instance *instance, u64 map_id)
159 struct fusion_context *fusion = instance->ctrl_context;
178 if (instance->max_raid_mapsize) {
183 dev_dbg(&instance->pdev->dev, "offsets of desc table are not matching desc %p original %p\n",
236 dev_dbg(&instance->pdev->dev, "wrong number of desctableElements %d\n",
242 } else if (instance->supportmax256vd) {
247 dev_dbg(&instance->pdev->dev, "megaraid_sas: LD count exposed in RAID map in not valid\n");
275 dev_dbg(&instance->pdev->dev,
302 u8 MR_ValidateMapInfo(struct megasas_instance *instance, u64 map_id)
314 if (MR_PopulateDrvRaidMap(instance, map_id))
317 fusion = instance->ctrl_context;
324 if (instance->max_raid_mapsize)
326 else if (instance->supportmax256vd)
334 dev_dbg(&instance->pdev->dev, "megasas: map info structure size 0x%x",
336 dev_dbg(&instance->pdev->dev, "is not matching expected size 0x%x\n",
338 dev_err(&instance->pdev->dev, "megasas: span map %x, pDrvRaidMap->totalSize : %x\n",
344 if (instance->UnevenSpanSupport)
352 memcpy(instance->ld_ids_prev,
353 instance->ld_ids_from_raidmap,
354 sizeof(instance->ld_ids_from_raidmap));
355 memset(instance->ld_ids_from_raidmap, 0xff, MEGASAS_MAX_LD_IDS);
366 instance->ld_ids_from_raidmap[i] = i;
411 * instance - HBA instance
423 static u32 mr_spanset_get_span_block(struct megasas_instance *instance,
426 struct fusion_context *fusion = instance->ctrl_context;
476 * instance - HBA instance
486 static u64 get_row_from_strip(struct megasas_instance *instance,
489 struct fusion_context *fusion = instance->ctrl_context;
533 * instance - HBA instance
543 static u64 get_strip_from_row(struct megasas_instance *instance,
546 struct fusion_context *fusion = instance->ctrl_context;
582 dev_err(&instance->pdev->dev, "get_strip_from_row"
594 * instance - HBA instance
604 static u32 get_arm_from_strip(struct megasas_instance *instance,
607 struct fusion_context *fusion = instance->ctrl_context;
640 dev_err(&instance->pdev->dev, "get_arm_from_strip"
648 static u8 get_arm(struct megasas_instance *instance, u32 ld, u8 span, u64 stripe,
663 arm = get_arm_from_strip(instance, ld, stripe, map);
690 static u8 mr_spanset_get_phy_params(struct megasas_instance *instance, u32 ld,
713 logArm = get_arm_from_strip(instance, ld, stripRow, map);
724 physArm = get_arm(instance, ld, span, stripRow, map);
735 if ((instance->adapter_type >= VENTURA_SERIES) &&
745 ((instance->adapter_type == THUNDERBOLT_SERIES) ||
746 ((instance->adapter_type == INVADER_SERIES) &&
760 if (instance->adapter_type >= VENTURA_SERIES) {
791 static u8 MR_GetPhyParams(struct megasas_instance *instance, u32 ld, u64 stripRow,
849 if ((instance->adapter_type >= VENTURA_SERIES) &&
859 ((instance->adapter_type == THUNDERBOLT_SERIES) ||
860 ((instance->adapter_type == INVADER_SERIES) &&
876 if (instance->adapter_type >= VENTURA_SERIES) {
892 * @instance: Adapter soft state
902 static void mr_get_phy_params_r56_rmw(struct megasas_instance *instance,
971 MR_BuildRaidContext(struct megasas_instance *instance,
998 fusion = instance->ctrl_context;
1012 else if (instance->UnevenSpanSupport) {
1015 dev_info(&instance->pdev->dev,
1040 start_row = get_row_from_strip(instance, ld, start_strip, map);
1041 endRow = get_row_from_strip(instance, ld, endStrip, map);
1043 dev_info(&instance->pdev->dev, "return from %s %d."
1053 startlba_span = (u8)mr_spanset_get_span_block(instance,
1056 dev_info(&instance->pdev->dev, "return from %s %d"
1131 if (start_strip == (get_strip_from_row(instance, ld, start_row, map) +
1146 if (endStrip == get_strip_from_row(instance, ld, endRow, map))
1156 if (instance->adapter_type == INVADER_SERIES)
1159 else if (instance->adapter_type == THUNDERBOLT_SERIES)
1171 mr_get_phy_params_r56_rmw(instance, ld, start_strip, io_info,
1181 mr_spanset_get_phy_params(instance, ld,
1184 MR_GetPhyParams(instance, ld, start_strip,
1195 mr_spanset_get_phy_params(instance, ld,
1199 MR_GetPhyParams(instance, ld,
1213 * local copy of ldSpanInfo per instance data structure.
1217 * ldSpanInfo - ldSpanInfo per HBA instance
1348 static u8 megasas_get_best_arm_pd(struct megasas_instance *instance,
1369 span_row_size = instance->UnevenSpanSupport ?
1410 __le16 get_updated_dev_handle(struct megasas_instance *instance,
1419 arm_pd = megasas_get_best_arm_pd(instance, lbInfo, io_info, drv_map);