/* Return EFI_NOT_READY if there is no data available  */
EFI_STATUS FastbootTransportUsbReceive(OUT UINTN *BufferSize, OUT VOID **Buffer)
/* Return EFI_NOT_READY if there is no data available  */
EFI_STATUS FastbootTransportUsbReceive(OUT UINTN *BufferSize, OUT VOID **Buffer)
{
  FASTBOOT_USB_PACKET_LIST  *Entry;
  if (IsListEmpty (&mPacketList)) {
    return EFI_NOT_READY;
  }
  Entry = (FASTBOOT_USB_PACKET_LIST *)GetFirstNode (&mPacketList);
  *BufferSize = Entry->BufferSize;
  *Buffer     = Entry->Buffer;
  RemoveEntryList (&Entry->Link);
  FreePool (Entry);
  return EFI_SUCCESS;
}