/* Ack the hub change bits. If these bits are not ACKed, Hub will always return changed bit map from its interrupt endpoint. */
EFI_STATUS UsbHubAckHubStatus(IN USB_DEVICE *HubDev)
/* Ack the hub change bits. If these bits are not ACKed, Hub will always return changed bit map from its interrupt endpoint. */
EFI_STATUS UsbHubAckHubStatus(IN USB_DEVICE *HubDev)
{
  EFI_USB_PORT_STATUS  HubState;
  EFI_STATUS           Status;
  Status = UsbHubCtrlGetHubStatus (HubDev, (UINT32 *)&HubState);
  if (EFI_ERROR (Status)) {
    return Status;
  }
  if (USB_BIT_IS_SET (HubState.PortChangeStatus, USB_HUB_STAT_C_LOCAL_POWER)) {
    UsbHubCtrlClearHubFeature (HubDev, USB_HUB_C_HUB_LOCAL_POWER);
  }
  if (USB_BIT_IS_SET (HubState.PortChangeStatus, USB_HUB_STAT_C_OVER_CURRENT)) {
    UsbHubCtrlClearHubFeature (HubDev, USB_HUB_C_HUB_OVER_CURRENT);
  }
  return EFI_SUCCESS;
}