/* Create a device which is on the parent's ParentPort port. */
USB_DEVICE* UsbCreateDevice(IN USB_INTERFACE *ParentIf, IN UINT8 ParentPort)
/* Create a device which is on the parent's ParentPort port. */
USB_DEVICE* UsbCreateDevice(IN USB_INTERFACE *ParentIf, IN UINT8 ParentPort)
{
  USB_DEVICE  *Device;
  ASSERT (ParentIf != NULL);
  Device = AllocateZeroPool (sizeof (USB_DEVICE));
  if (Device == NULL) {
    return NULL;
  }
  Device->Bus        = ParentIf->Device->Bus;
  Device->MaxPacket0 = 8;
  Device->ParentAddr = ParentIf->Device->Address;
  Device->ParentIf   = ParentIf;
  Device->ParentPort = ParentPort;
  Device->Tier       = (UINT8)(ParentIf->Device->Tier + 1);
  return Device;
}