Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F148033832
D49747.1785172253.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D49747.1785172253.diff
View Options
diff --git a/sys/dev/mpi3mr/mpi3mr.c b/sys/dev/mpi3mr/mpi3mr.c
--- a/sys/dev/mpi3mr/mpi3mr.c
+++ b/sys/dev/mpi3mr/mpi3mr.c
@@ -2784,18 +2784,37 @@
}
if (ioc_state != MRIOC_STATE_RESET) {
- mpi3mr_print_fault_info(sc);
- mpi3mr_dprint(sc, MPI3MR_ERROR, "issuing soft reset to bring to reset state\n");
- retval = mpi3mr_issue_reset(sc,
- MPI3_SYSIF_HOST_DIAG_RESET_ACTION_SOFT_RESET,
- MPI3MR_RESET_FROM_BRINGUP);
- if (retval) {
- mpi3mr_dprint(sc, MPI3MR_ERROR,
- "%s :Failed to soft reset IOC, error 0x%d\n",
- __func__, retval);
+ if (ioc_state == MRIOC_STATE_FAULT) {
+ mpi3mr_print_fault_info(sc);
+
+ U32 fault = mpi3mr_regread(sc, MPI3_SYSIF_FAULT_OFFSET) &
+ MPI3_SYSIF_FAULT_CODE_MASK;
+ if (fault == MPI3_SYSIF_FAULT_CODE_INSUFFICIENT_PCI_SLOT_POWER)
+ mpi3mr_dprint(sc, MPI3MR_INFO,
+ "controller faulted due to insufficient power. "
+ "try by connecting it in a different slot\n");
+ goto err;
+
+ U32 host_diagnostic;
+ timeout = MPI3_SYSIF_DIAG_SAVE_TIMEOUT * 10;
+ do {
+ host_diagnostic = mpi3mr_regread(sc, MPI3_SYSIF_HOST_DIAG_OFFSET);
+ if (!(host_diagnostic & MPI3_SYSIF_HOST_DIAG_SAVE_IN_PROGRESS))
+ break;
+ DELAY(100 * 1000);
+ } while (--timeout);
+ }
+ mpi3mr_dprint(sc, MPI3MR_ERROR, "issuing soft reset to bring to reset state\n");
+ retval = mpi3mr_issue_reset(sc,
+ MPI3_SYSIF_HOST_DIAG_RESET_ACTION_SOFT_RESET,
+ MPI3MR_RESET_FROM_BRINGUP);
+ if (retval) {
+ mpi3mr_dprint(sc, MPI3MR_ERROR,
+ "%s :Failed to soft reset IOC, error 0x%d\n",
+ __func__, retval);
goto err_retry;
- }
- }
+ }
+ }
ioc_state = mpi3mr_get_iocstate(sc);
@@ -3165,6 +3184,15 @@
sc->unrecoverable = 1;
break;
}
+
+ if (fault == MPI3_SYSIF_FAULT_CODE_INSUFFICIENT_PCI_SLOT_POWER) {
+ mpi3mr_dprint(sc, MPI3MR_INFO,
+ "controller faulted due to insufficient power, marking"
+ " controller as unrecoverable\n");
+ sc->unrecoverable = 1;
+ break;
+ }
+
if ((fault == MPI3_SYSIF_FAULT_CODE_DIAG_FAULT_RESET)
|| (fault == MPI3_SYSIF_FAULT_CODE_SOFT_RESET_IN_PROGRESS)
|| (sc->reset_in_progress))
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jul 27, 5:10 PM (6 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29279690
Default Alt Text
D49747.1785172253.diff (2 KB)
Attached To
Mode
D49747: mpi3mr: Handle Insufficient Power Fault Code
Attached
Detach File
Event Timeline
Log In to Comment