/* Reset the port and re-configure the usb device. */
EFI_STATUS EFIAPI PeiUsbPortReset(IN EFI_PEI_SERVICES **PeiServices, IN PEI_USB_IO_PPI *This)
/* Reset the port and re-configure the usb device. */
EFI_STATUS EFIAPI PeiUsbPortReset(IN EFI_PEI_SERVICES **PeiServices, IN PEI_USB_IO_PPI *This)
{
  PEI_USB_DEVICE  *PeiUsbDev;
  EFI_STATUS      Status;
  UINT8           Address;
  PeiUsbDev = PEI_USB_DEVICE_FROM_THIS (This);
  ResetRootPort (
    PeiServices,
    PeiUsbDev->UsbHcPpi,
    PeiUsbDev->Usb2HcPpi,
    PeiUsbDev->DeviceAddress,
    0
    );
  Address                  = PeiUsbDev->DeviceAddress;
  PeiUsbDev->DeviceAddress = 0;
  Status = PeiUsbSetDeviceAddress (
             PeiServices,
             This,
             Address
             );
  if (EFI_ERROR (Status)) {
    return Status;
  }
  PeiUsbDev->DeviceAddress = Address;
  Status = PeiUsbSetConfiguration (
             PeiServices,
             This
             );
  return Status;
}