/* This FILTER_FUNCTION checks if a handle corresponds to a non-discoverable USB host controller.  */
STATIC BOOLEAN EFIAPI IsUsbHost(IN EFI_HANDLE Handle, IN CONST CHAR16 *ReportText)
/* This FILTER_FUNCTION checks if a handle corresponds to a non-discoverable USB host controller.  */
STATIC BOOLEAN EFIAPI IsUsbHost(IN EFI_HANDLE Handle, IN CONST CHAR16 *ReportText)
{
  NON_DISCOVERABLE_DEVICE  *Device;
  EFI_STATUS               Status;
  Status = gBS->HandleProtocol (
                  Handle,
                  &gEdkiiNonDiscoverableDeviceProtocolGuid,
                  (VOID **)&Device
                  );
  if (EFI_ERROR (Status)) {
    return FALSE;
  }
  if (CompareGuid (Device->Type, &gEdkiiNonDiscoverableUhciDeviceGuid) ||
      CompareGuid (Device->Type, &gEdkiiNonDiscoverableEhciDeviceGuid) ||
      CompareGuid (Device->Type, &gEdkiiNonDiscoverableXhciDeviceGuid))
  {
    return TRUE;
  }
  return FALSE;
}