/* Find the child device on the hub's port. */
USB_DEVICE* UsbFindChild(IN USB_INTERFACE *HubIf, IN UINT8 Port)
/* Find the child device on the hub's port. */
USB_DEVICE* UsbFindChild(IN USB_INTERFACE *HubIf, IN UINT8 Port)
{
  USB_DEVICE  *Device;
  USB_BUS     *Bus;
  UINTN       Index;
  Bus = HubIf->Device->Bus;
  for (Index = 1; Index < Bus->MaxDevices; Index++) {
    Device = Bus->Devices[Index];
    if ((Device != NULL) && (Device->ParentAddr == HubIf->Device->Address) &&
        (Device->ParentPort == Port))
    {
      return Device;
    }
  }
  return NULL;
}