Page MenuHomeFreeBSD

D12901.id34643.diff
No OneTemporary

D12901.id34643.diff

Index: sys/dev/mpr/mpr_mapping.c
===================================================================
--- sys/dev/mpr/mpr_mapping.c
+++ sys/dev/mpr/mpr_mapping.c
@@ -2207,7 +2207,7 @@
free(sc->dpm_pg0, M_MPR);
}
-static void
+static bool
_mapping_process_dpm_pg0(struct mpr_softc *sc)
{
u8 missing_cnt, enc_idx;
@@ -2336,7 +2336,7 @@
"%s: Conflict in mapping table for "
" enclosure %d\n", __func__,
enc_idx);
- break;
+ goto fail;
}
physical_id =
dpm_entry->PhysicalIdentifier.High;
@@ -2363,7 +2363,7 @@
mpr_dprint(sc, MPR_ERROR | MPR_MAPPING, "%s: "
"Conflict in mapping table for device %d\n",
__func__, map_idx);
- break;
+ goto fail;
}
physical_id = dpm_entry->PhysicalIdentifier.High;
mt_entry->physical_id = (physical_id << 32) |
@@ -2375,6 +2375,16 @@
mt_entry->device_info = MPR_DEV_RESERVED;
}
} /*close the loop for DPM table */
+ return (true);
+
+fail:
+ for (entry_num = 0; entry_num < sc->max_dpm_entries; entry_num++,
+ dpm_entry++) {
+ sc->dpm_entry_used[entry_num] = 0;
+ /* for IR firmware, should wipe out sc->mapping_table volumes */
+ }
+ sc->num_enc_table_entries = 0;
+ return (false);
}
/*
@@ -2614,9 +2624,11 @@
}
}
- if (sc->is_dpm_enable)
- _mapping_process_dpm_pg0(sc);
- else {
+ if (sc->is_dpm_enable) {
+ if (!_mapping_process_dpm_pg0(sc))
+ sc->is_dpm_enable = 0;
+ }
+ if (! sc->is_dpm_enable) {
mpr_dprint(sc, MPR_MAPPING, "%s: DPM processing is disabled. "
"Device mappings will not persist across reboots or "
"resets.\n", __func__);

File Metadata

Mime Type
text/plain
Expires
Mon, Feb 16, 7:33 AM (22 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28771272
Default Alt Text
D12901.id34643.diff (1 KB)

Event Timeline