Fix GetHealthStatus protocol function for namespace handle
GetHealthStatus function supported in our driver under DriverHealth
protocol was failing to determine the health status of namespace.
The fix is to determine the namespace device type correctly when the
child handle passed to this function is a namespace handle.
@@ -2015,14 +2015,22 @@ ResolveDeviceType(
*pResultDevice = Dimm;
ReturnCode = HandleToPID(ChildHandle, NULL, &DimmPid);
if (EFI_ERROR(ReturnCode)) {
- // We couldn't find the DIMM, apparently it was some other kind of child handle
+ // The child handle is not our DIMM... but it can be our namespace
+ if (HandleToNamespace(ChildHandle) != NULL) {
+ *pResultDevice = Namespace;
+ ReturnCode = EFI_SUCCESS;
+ }
+ else {
*pResultDevice = Unknown;
ReturnCode = EFI_UNSUPPORTED;
}
+ goto Finish;
+ }
if (pDimmPid != NULL) {
*pDimmPid = DimmPid;
}
+
Finish:
#endif
NVDIMM_EXIT_I64(ReturnCode);
