/* Read the whole usb hub descriptor. It is necessary to do it in two steps because hub descriptor is of variable length. */
EFI_STATUS UsbHubReadDesc(IN USB_DEVICE *HubDev, OUT EFI_USB_HUB_DESCRIPTOR *HubDesc)
/* Read the whole usb hub descriptor. It is necessary to do it in two steps because hub descriptor is of variable length. */
EFI_STATUS UsbHubReadDesc(IN USB_DEVICE *HubDev, OUT EFI_USB_HUB_DESCRIPTOR *HubDesc)
{
  EFI_STATUS  Status;
  Status = UsbHubCtrlGetHubDesc (HubDev, HubDesc, 2);
  if (EFI_ERROR (Status)) {
    return Status;
  }
  return UsbHubCtrlGetHubDesc (HubDev, HubDesc, HubDesc->Length);
}