Log a PEL for communication, presence mismatch, and safe state errors
Add code to log a PEL in various error scenarios. Refactor some of the
error handling to get the return code out of the driver.
Signed-off-by: Eddie James <eajames@linux.ibm.com>
Change-Id: Ifd91cfc063718e484ec8886df8357d115c6b41e3
diff --git a/occ_status.cpp b/occ_status.cpp
index 6174c91..14981c7 100644
--- a/occ_status.cpp
+++ b/occ_status.cpp
@@ -116,7 +116,7 @@
}
// Callback handler when a device error is reported.
-void Status::deviceError()
+void Status::deviceError(Error::Descriptor d)
{
#ifdef POWER10
if (pmode && device.master())
@@ -126,6 +126,11 @@
}
#endif
+ if (d.log)
+ {
+ FFDC::createOCCResetPEL(instance, d.path, d.err, d.callout);
+ }
+
// This would deem OCC inactive
this->occActive(false);
@@ -327,7 +332,7 @@
instance)
.c_str());
// Disable and reset to try recovering
- deviceError();
+ deviceError(Error::Descriptor(SAFE_ERROR_PATH));
}
}
#endif // POWER10