/* Submit a USB set descriptor request for the USB device specified by UsbIo, Value, and Index, and set the descriptor using the buffer specified by DesriptorLength and Descriptor. The status of the transfer is returned in Status. If UsbIo is NULL, then ASSERT(). If Descriptor is NULL, then ASSERT(). If Status is NULL, then ASSERT(). */
EFI_STATUS EFIAPI UsbSetDescriptor(IN EFI_USB_IO_PROTOCOL *UsbIo, IN UINT16 Value, IN UINT16 Index, IN UINT16 DescriptorLength, IN VOID *Descriptor, OUT UINT32 *Status)
/* Submit a USB set descriptor request for the USB device specified by UsbIo, Value, and Index, and set the descriptor using the buffer specified by DesriptorLength and Descriptor. The status of the transfer is returned in Status. If UsbIo is NULL, then ASSERT(). If Descriptor is NULL, then ASSERT(). If Status is NULL, then ASSERT(). */
EFI_STATUS EFIAPI UsbSetDescriptor(IN EFI_USB_IO_PROTOCOL *UsbIo, IN UINT16 Value, IN UINT16 Index, IN UINT16 DescriptorLength, IN VOID *Descriptor, OUT UINT32 *Status)
{
  EFI_USB_DEVICE_REQUEST  DevReq;
  ASSERT (UsbIo != NULL);
  ASSERT (Descriptor != NULL);
  ASSERT (Status != NULL);
  ZeroMem (&DevReq, sizeof (EFI_USB_DEVICE_REQUEST));
  DevReq.RequestType = USB_DEV_SET_DESCRIPTOR_REQ_TYPE;
  DevReq.Request     = USB_REQ_SET_DESCRIPTOR;
  DevReq.Value       = Value;
  DevReq.Index       = Index;
  DevReq.Length      = DescriptorLength;
  return UsbIo->UsbControlTransfer (
                  UsbIo,
                  &DevReq,
                  EfiUsbDataOut,
                  PcdGet32 (PcdUsbTransferTimeoutValue),
                  Descriptor,
                  DescriptorLength,
                  Status
                  );
}