/* USB hub control transfer to set the hub depth. */
EFI_STATUS PeiUsbHubCtrlSetHubDepth(IN EFI_PEI_SERVICES **PeiServices, IN PEI_USB_DEVICE *PeiUsbDevice, IN PEI_USB_IO_PPI *UsbIoPpi)
/* USB hub control transfer to set the hub depth. */
EFI_STATUS PeiUsbHubCtrlSetHubDepth(IN EFI_PEI_SERVICES **PeiServices, IN PEI_USB_DEVICE *PeiUsbDevice, IN PEI_USB_IO_PPI *UsbIoPpi)
{
  EFI_USB_DEVICE_REQUEST  DevReq;
  ZeroMem (&DevReq, sizeof (EFI_USB_DEVICE_REQUEST));
  DevReq.RequestType = USB_RT_HUB;
  DevReq.Request     = USB_HUB_REQ_SET_DEPTH;
  DevReq.Value       = PeiUsbDevice->Tier;
  DevReq.Length      = 0;
  return UsbIoPpi->UsbControlTransfer (
                     PeiServices,
                     UsbIoPpi,
                     &DevReq,
                     EfiUsbNoData,
                     PcdGet32 (PcdUsbTransferTimeoutValue),
                     NULL,
                     0
                     );
}