/* Processes a single controller using the EFI Driver Health Protocol associated with that controller. */
VOID DriverHealthManagerProcessSingleControllerHealth(IN EFI_DRIVER_HEALTH_PROTOCOL *DriverHealth, IN EFI_HANDLE ControllerHandle OPTIONAL, IN EFI_HANDLE ChildHandle OPTIONAL, IN EFI_DRIVER_HEALTH_STATUS HealthStatus, IN EFI_DRIVER_HEALTH_HII_MESSAGE **MessageList OPTIONAL, IN EFI_HII_HANDLE FormHiiHandle)
/* Processes a single controller using the EFI Driver Health Protocol associated with that controller. */
VOID DriverHealthManagerProcessSingleControllerHealth(IN EFI_DRIVER_HEALTH_PROTOCOL *DriverHealth, IN EFI_HANDLE ControllerHandle OPTIONAL, IN EFI_HANDLE ChildHandle OPTIONAL, IN EFI_DRIVER_HEALTH_STATUS HealthStatus, IN EFI_DRIVER_HEALTH_HII_MESSAGE **MessageList OPTIONAL, IN EFI_HII_HANDLE FormHiiHandle)
{
  EFI_STATUS  Status;
  ASSERT (HealthStatus != EfiDriverHealthStatusConfigurationRequired);
  switch (HealthStatus) {
    case EfiDriverHealthStatusRepairRequired:
      Status = DriverHealth->Repair (
                               DriverHealth,
                               ControllerHandle,
                               ChildHandle,
                               DriverHealthManagerRepairNotify
                               );
      break;
    case EfiDriverHealthStatusRebootRequired:
      gRT->ResetSystem (EfiResetWarm, EFI_SUCCESS, 0, NULL);
      break;
    case EfiDriverHealthStatusReconnectRequired:
      Status = gBS->DisconnectController (ControllerHandle, NULL, NULL);
      if (EFI_ERROR (Status)) {
        gRT->ResetSystem (EfiResetWarm, EFI_SUCCESS, 0, NULL);
      } else {
        gBS->ConnectController (ControllerHandle, NULL, NULL, TRUE);
      }
      break;
    default:
      break;
  }
}