64 IN OUT VOID *Data OPTIONAL,
74 UINTN RequestedDataLength;
76 if (UsbStatus ==
NULL) {
77 return EFI_INVALID_PARAMETER;
80 OldTpl =
gBS->RaiseTPL (USB_BUS_TPL);
82 UsbIf = USB_INTERFACE_FROM_USBIO (This);
85 RequestedDataLength = DataLength;
105 if (!EFI_ERROR (Status)) {
106 if ((Direction != EfiUsbNoData) && (DataLength != RequestedDataLength)) {
107 Status = EFI_DEVICE_ERROR;
112 if (EFI_ERROR (Status) || (*UsbStatus != EFI_USB_NOERROR)) {
142 if ((Request->Request == USB_REQ_CLEAR_FEATURE) &&
143 (Request->RequestType == USB_REQUEST_TYPE (
145 USB_REQ_TYPE_STANDARD,
148 (Request->Value == USB_FEATURE_ENDPOINT_HALT))
152 if (EpDesc !=
NULL) {
164 if ((Request->Request == USB_REQ_SET_CONFIG) &&
165 (Request->RequestType == USB_REQUEST_TYPE (
167 USB_REQ_TYPE_STANDARD,
174 if ((Dev->ActiveConfig !=
NULL) &&
175 (Request->Value == Dev->ActiveConfig->Desc.ConfigurationValue))
180 DEBUG ((DEBUG_INFO,
"UsbIoControlTransfer: configure changed!!! Do NOT use old UsbIo!!!\n"));
182 if (Dev->ActiveConfig !=
NULL) {
186 if (Request->Value != 0) {
202 if ((Request->Request == USB_REQ_SET_INTERFACE) &&
203 (Request->RequestType == USB_REQUEST_TYPE (
205 USB_REQ_TYPE_STANDARD,
208 (Request->Index == UsbIf->IfSetting->Desc.InterfaceNumber))
212 if (!EFI_ERROR (Status)) {
213 ASSERT (UsbIf->IfDesc->ActiveIndex < USB_MAX_INTERFACE_SETTING);
214 UsbIf->IfSetting = UsbIf->IfDesc->Settings[UsbIf->IfDesc->ActiveIndex];
219 gBS->RestoreTPL (OldTpl);
247 OUT UINT32 *UsbStatus
258 if ((USB_ENDPOINT_ADDR (Endpoint) == 0) || (USB_ENDPOINT_ADDR (Endpoint) > 15) ||
261 return EFI_INVALID_PARAMETER;
264 OldTpl =
gBS->RaiseTPL (USB_BUS_TPL);
266 UsbIf = USB_INTERFACE_FROM_USBIO (This);
271 if ((EpDesc ==
NULL) || (USB_ENDPOINT_TYPE (&EpDesc->Desc) != USB_ENDPOINT_BULK)) {
272 Status = EFI_INVALID_PARAMETER;
277 Toggle = EpDesc->Toggle;
283 EpDesc->Desc.MaxPacketSize,
293 EpDesc->Toggle = Toggle;
295 if (EFI_ERROR (Status) || (*UsbStatus != EFI_USB_NOERROR)) {
313 gBS->RestoreTPL (OldTpl);
341 OUT UINT32 *UsbStatus
351 if ((USB_ENDPOINT_ADDR (Endpoint) == 0) || (USB_ENDPOINT_ADDR (Endpoint) > 15) ||
354 return EFI_INVALID_PARAMETER;
357 OldTpl =
gBS->RaiseTPL (USB_BUS_TPL);
359 UsbIf = USB_INTERFACE_FROM_USBIO (This);
364 if ((EpDesc ==
NULL) || (USB_ENDPOINT_TYPE (&EpDesc->Desc) != USB_ENDPOINT_INTERRUPT)) {
365 Status = EFI_INVALID_PARAMETER;
369 Toggle = EpDesc->Toggle;
375 EpDesc->Desc.MaxPacketSize,
384 EpDesc->Toggle = Toggle;
387 gBS->RestoreTPL (OldTpl);
416 IN BOOLEAN IsNewTransfer,
417 IN UINTN PollInterval OPTIONAL,
420 IN VOID *Context OPTIONAL
430 if ((USB_ENDPOINT_ADDR (Endpoint) == 0) || (USB_ENDPOINT_ADDR (Endpoint) > 15)) {
431 return EFI_INVALID_PARAMETER;
434 OldTpl =
gBS->RaiseTPL (USB_BUS_TPL);
435 UsbIf = USB_INTERFACE_FROM_USBIO (This);
440 if ((EpDesc ==
NULL) || (USB_ENDPOINT_TYPE (&EpDesc->Desc) != USB_ENDPOINT_INTERRUPT)) {
441 Status = EFI_INVALID_PARAMETER;
445 Toggle = EpDesc->Toggle;
451 EpDesc->Desc.MaxPacketSize,
461 EpDesc->Toggle = Toggle;
464 gBS->RestoreTPL (OldTpl);
484 IN UINT8 DeviceEndpoint,
490 return EFI_UNSUPPORTED;
511 IN UINT8 DeviceEndpoint,
515 IN VOID *Context OPTIONAL
518 return EFI_UNSUPPORTED;
542 if (Descriptor ==
NULL) {
543 return EFI_INVALID_PARAMETER;
546 OldTpl =
gBS->RaiseTPL (USB_BUS_TPL);
548 UsbIf = USB_INTERFACE_FROM_USBIO (This);
553 gBS->RestoreTPL (OldTpl);
580 if (Descriptor ==
NULL) {
581 return EFI_INVALID_PARAMETER;
585 OldTpl =
gBS->RaiseTPL (USB_BUS_TPL);
587 UsbIf = USB_INTERFACE_FROM_USBIO (This);
590 if (Dev->ActiveConfig ==
NULL) {
591 Status = EFI_NOT_FOUND;
598 gBS->RestoreTPL (OldTpl);
622 if (Descriptor ==
NULL) {
623 return EFI_INVALID_PARAMETER;
626 OldTpl =
gBS->RaiseTPL (USB_BUS_TPL);
628 UsbIf = USB_INTERFACE_FROM_USBIO (This);
631 gBS->RestoreTPL (OldTpl);
658 OldTpl =
gBS->RaiseTPL (USB_BUS_TPL);
660 UsbIf = USB_INTERFACE_FROM_USBIO (This);
662 if ((Descriptor ==
NULL) || (Index > 15)) {
663 gBS->RestoreTPL (OldTpl);
664 return EFI_INVALID_PARAMETER;
667 if (Index >= UsbIf->IfSetting->Desc.NumEndpoints) {
668 gBS->RestoreTPL (OldTpl);
669 return EFI_NOT_FOUND;
674 &(UsbIf->IfSetting->Endpoints[Index]->Desc),
678 gBS->RestoreTPL (OldTpl);
696 OUT UINT16 **LangIDTable,
697 OUT UINT16 *TableSize
704 OldTpl =
gBS->RaiseTPL (USB_BUS_TPL);
706 UsbIf = USB_INTERFACE_FROM_USBIO (This);
709 *LangIDTable = Dev->LangId;
710 *TableSize = (UINT16)(Dev->TotalLangId * sizeof (UINT16));
712 gBS->RestoreTPL (OldTpl);
733 IN UINT8 StringIndex,
745 if ((StringIndex == 0) || (LangID == 0)) {
746 return EFI_NOT_FOUND;
749 OldTpl =
gBS->RaiseTPL (USB_BUS_TPL);
751 UsbIf = USB_INTERFACE_FROM_USBIO (This);
757 Status = EFI_NOT_FOUND;
759 for (Index = 0; Index < Dev->TotalLangId; Index++) {
760 ASSERT (Index < USB_MAX_LANG_ID);
761 if (Dev->LangId[Index] == LangID) {
766 if (Index == Dev->TotalLangId) {
776 if (StrDesc ==
NULL) {
780 if (StrDesc->Length <= 2) {
787 Status = EFI_OUT_OF_RESOURCES;
791 CopyMem (Buf, StrDesc->String, StrDesc->Length - 2);
792 *String = (CHAR16 *)Buf;
796 gBS->FreePool (StrDesc);
799 gBS->RestoreTPL (OldTpl);
827 OldTpl =
gBS->RaiseTPL (USB_BUS_TPL);
829 UsbIf = USB_INTERFACE_FROM_USBIO (This);
833 Status = EFI_INVALID_PARAMETER;
837 HubIf = Dev->ParentIf;
838 Status = HubIf->HubApi->ResetPort (HubIf, Dev->ParentPort);
840 if (EFI_ERROR (Status)) {
843 "UsbIoPortReset: failed to reset hub port %d@hub %d - %r\n",
852 HubIf->HubApi->ClearPortChange (HubIf, Dev->ParentPort);
859 DevAddress = Dev->Address;
862 Dev->Address = DevAddress;
864 gBS->Stall (USB_SET_DEVICE_ADDRESS_STALL);
866 if (EFI_ERROR (Status)) {
872 "UsbIoPortReset: failed to set address for device %d - %r\n",
880 DEBUG ((DEBUG_INFO,
"UsbIoPortReset: device is now ADDRESSED at %d\n", Dev->Address));
886 if (Dev->ActiveConfig !=
NULL) {
890 if (EFI_ERROR (Status)) {
891 DEBUG ((DEBUG_ERROR,
"UsbIoPortReset: Failed to remove configuration - %r\n", Status));
895 if (EFI_ERROR (Status)) {
896 DEBUG ((DEBUG_ERROR,
"UsbIoPortReset: Failed to get max packet size - %r\n", Status));
900 if (EFI_ERROR (Status)) {
901 DEBUG ((DEBUG_ERROR,
"UsbIoPortReset: Failed to build descriptor table - %r\n", Status));
904 Config = Dev->DevDesc->Configs[0]->Desc.ConfigurationValue;
907 if (EFI_ERROR (Status)) {
910 "UsbIoPortReset: failed to set configure for device %d - %r\n",
917 if (EFI_ERROR (Status)) {
918 DEBUG ((DEBUG_ERROR,
"UsbIoPortReset: Failed to set configuration - %r\n", Status));
923 gBS->RestoreTPL (OldTpl);
955 if (UsbBus ==
NULL) {
956 return EFI_OUT_OF_RESOURCES;
959 UsbBus->Signature = USB_BUS_SIGNATURE;
960 UsbBus->HostHandle = Controller;
961 UsbBus->MaxDevices = USB_MAX_DEVICES;
963 Status =
gBS->OpenProtocol (
965 &gEfiDevicePathProtocolGuid,
966 (VOID **)&UsbBus->DevicePath,
967 This->DriverBindingHandle,
969 EFI_OPEN_PROTOCOL_BY_DRIVER
972 if (EFI_ERROR (Status)) {
973 DEBUG ((DEBUG_ERROR,
"UsbBusStart: Failed to open device path - %r\n", Status));
987 Status =
gBS->OpenProtocol (
989 &gEfiUsb2HcProtocolGuid,
990 (VOID **)&(UsbBus->Usb2Hc),
991 This->DriverBindingHandle,
993 EFI_OPEN_PROTOCOL_BY_DRIVER
996 Status2 =
gBS->OpenProtocol (
998 &gEfiUsbHcProtocolGuid,
999 (VOID **)&(UsbBus->UsbHc),
1000 This->DriverBindingHandle,
1002 EFI_OPEN_PROTOCOL_BY_DRIVER
1005 if (EFI_ERROR (Status) && EFI_ERROR (Status2)) {
1006 DEBUG ((DEBUG_ERROR,
"UsbBusStart: Failed to open USB_HC/USB2_HC - %r\n", Status));
1008 Status = EFI_DEVICE_ERROR;
1012 if (!EFI_ERROR (Status)) {
1017 ASSERT (UsbBus->Usb2Hc !=
NULL);
1019 UsbBus->MaxDevices = 256;
1026 Status =
gBS->InstallProtocolInterface (
1033 if (EFI_ERROR (Status)) {
1034 DEBUG ((DEBUG_ERROR,
"UsbBusStart: Failed to install bus protocol - %r\n", Status));
1043 ASSERT (!EFI_ERROR (Status));
1049 if (RootHub ==
NULL) {
1050 Status = EFI_OUT_OF_RESOURCES;
1051 goto UNINSTALL_USBBUS;
1056 if (RootIf ==
NULL) {
1058 Status = EFI_OUT_OF_RESOURCES;
1062 RootHub->Bus = UsbBus;
1063 RootHub->NumOfInterface = 1;
1064 RootHub->Interfaces[0] = RootIf;
1066 RootIf->Signature = USB_INTERFACE_SIGNATURE;
1067 RootIf->Device = RootHub;
1068 RootIf->DevicePath = UsbBus->DevicePath;
1075 (EFI_IO_BUS_USB | EFI_IOB_PC_DETECT),
1079 Status = mUsbRootHubApi.Init (RootIf);
1081 if (EFI_ERROR (Status)) {
1082 DEBUG ((DEBUG_ERROR,
"UsbBusStart: Failed to init root hub - %r\n", Status));
1086 UsbBus->Devices[0] = RootHub;
1088 DEBUG ((DEBUG_INFO,
"UsbBusStart: usb bus started on %p, root hub %p\n", Controller, RootIf));
1092 if (RootIf !=
NULL) {
1096 if (RootHub !=
NULL) {
1101 gBS->UninstallProtocolInterface (Controller, &gEfiCallerIdGuid, &UsbBus->BusId);
1104 if (UsbBus->Usb2Hc !=
NULL) {
1105 gBS->CloseProtocol (
1107 &gEfiUsb2HcProtocolGuid,
1108 This->DriverBindingHandle,
1113 if (UsbBus->UsbHc !=
NULL) {
1114 gBS->CloseProtocol (
1116 &gEfiUsbHcProtocolGuid,
1117 This->DriverBindingHandle,
1122 gBS->CloseProtocol (
1124 &gEfiDevicePathProtocolGuid,
1125 This->DriverBindingHandle,
1130 DEBUG ((DEBUG_ERROR,
"UsbBusStart: Failed to start bus driver - %r\n", Status));
1154 &mUsbBusDriverBinding,
1156 &mUsbBusComponentName,
1157 &mUsbBusComponentName2
1189 if (RemainingDevicePath !=
NULL) {
1199 DevicePathNode.DevPath = RemainingDevicePath;
1207 return EFI_UNSUPPORTED;
1215 Status =
gBS->OpenProtocol (
1217 &gEfiUsb2HcProtocolGuid,
1219 This->DriverBindingHandle,
1221 EFI_OPEN_PROTOCOL_BY_DRIVER
1223 if (Status == EFI_ALREADY_STARTED) {
1227 if (EFI_ERROR (Status)) {
1231 Status =
gBS->OpenProtocol (
1233 &gEfiUsbHcProtocolGuid,
1235 This->DriverBindingHandle,
1237 EFI_OPEN_PROTOCOL_BY_DRIVER
1239 if (Status == EFI_ALREADY_STARTED) {
1243 if (EFI_ERROR (Status)) {
1250 gBS->CloseProtocol (
1252 &gEfiUsbHcProtocolGuid,
1253 This->DriverBindingHandle,
1260 gBS->CloseProtocol (
1262 &gEfiUsb2HcProtocolGuid,
1263 This->DriverBindingHandle,
1271 Status =
gBS->OpenProtocol (
1273 &gEfiDevicePathProtocolGuid,
1274 (VOID **)&ParentDevicePath,
1275 This->DriverBindingHandle,
1277 EFI_OPEN_PROTOCOL_BY_DRIVER
1279 if (Status == EFI_ALREADY_STARTED) {
1283 if (!EFI_ERROR (Status)) {
1287 gBS->CloseProtocol (
1289 &gEfiDevicePathProtocolGuid,
1290 This->DriverBindingHandle,
1325 Status =
gBS->OpenProtocol (
1327 &gEfiDevicePathProtocolGuid,
1328 (VOID **)&ParentDevicePath,
1329 This->DriverBindingHandle,
1331 EFI_OPEN_PROTOCOL_GET_PROTOCOL
1348 Status =
gBS->OpenProtocol (
1352 This->DriverBindingHandle,
1354 EFI_OPEN_PROTOCOL_GET_PROTOCOL
1357 if (EFI_ERROR (Status)) {
1363 if (EFI_ERROR (Status)) {
1370 Status =
gBS->OpenProtocol (
1374 This->DriverBindingHandle,
1376 EFI_OPEN_PROTOCOL_GET_PROTOCOL
1378 ASSERT (!EFI_ERROR (Status));
1389 if (RemainingDevicePath !=
NULL) {
1400 ASSERT (!EFI_ERROR (Status));
1405 ASSERT (!EFI_ERROR (Status));
1447 if (NumberOfChildren > 0) {
1451 OldTpl =
gBS->RaiseTPL (TPL_CALLBACK);
1454 for (Index = 0; Index < NumberOfChildren; Index++) {
1455 Status =
gBS->OpenProtocol (
1456 ChildHandleBuffer[Index],
1457 &gEfiUsbIoProtocolGuid,
1459 This->DriverBindingHandle,
1461 EFI_OPEN_PROTOCOL_GET_PROTOCOL
1464 if (EFI_ERROR (Status)) {
1474 UsbIf = USB_INTERFACE_FROM_USBIO (UsbIo);
1475 UsbDev = UsbIf->Device;
1480 gBS->RestoreTPL (OldTpl);
1481 return ReturnStatus;
1484 DEBUG ((DEBUG_INFO,
"UsbBusStop: usb bus stopped on %p\n", Controller));
1489 Status =
gBS->OpenProtocol (
1493 This->DriverBindingHandle,
1495 EFI_OPEN_PROTOCOL_GET_PROTOCOL
1498 if (EFI_ERROR (Status)) {
1502 Bus = USB_BUS_FROM_THIS (BusId);
1509 OldTpl =
gBS->RaiseTPL (TPL_CALLBACK);
1511 RootHub = Bus->Devices[0];
1512 RootIf = RootHub->Interfaces[0];
1514 ASSERT (Bus->MaxDevices <= 256);
1516 for (Index = 1; Index < Bus->MaxDevices; Index++) {
1517 if (Bus->Devices[Index] !=
NULL) {
1519 if (EFI_ERROR (Status)) {
1520 ReturnStatus = Status;
1525 gBS->RestoreTPL (OldTpl);
1527 if (!EFI_ERROR (ReturnStatus)) {
1528 mUsbRootHubApi.Release (RootIf);
1529 gBS->FreePool (RootIf);
1530 gBS->FreePool (RootHub);
1533 ASSERT (!EFI_ERROR (Status));
1538 gBS->UninstallProtocolInterface (Controller, &gEfiCallerIdGuid, &Bus->BusId);
1540 if (Bus->Usb2Hc !=
NULL) {
1541 Status =
gBS->CloseProtocol (
1543 &gEfiUsb2HcProtocolGuid,
1544 This->DriverBindingHandle,
1549 if (Bus->UsbHc !=
NULL) {
1550 Status =
gBS->CloseProtocol (
1552 &gEfiUsbHcProtocolGuid,
1553 This->DriverBindingHandle,
1558 if (!EFI_ERROR (Status)) {
1559 gBS->CloseProtocol (
1561 &gEfiDevicePathProtocolGuid,
1562 This->DriverBindingHandle,
1566 gBS->FreePool (Bus);
LIST_ENTRY *EFIAPI InitializeListHead(IN OUT LIST_ENTRY *ListHead)
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
#define MESSAGING_DEVICE_PATH
BOOLEAN EFIAPI IsDevicePathEnd(IN CONST VOID *Node)
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
VOID EFIAPI FreePool(IN VOID *Buffer)
#define ASSERT_EFI_ERROR(StatusParameter)
#define DEBUG(Expression)
#define REPORT_STATUS_CODE(Type, Value)
#define REPORT_STATUS_CODE_WITH_DEVICE_PATH(Type, Value, DevicePathParameter)
EFI_STATUS(EFIAPI * EFI_ASYNC_USB_TRANSFER_CALLBACK)(IN VOID *Data, IN UINTN DataLength, IN VOID *Context, IN UINT32 Status)
#define EFI_PROGRESS_CODE
EFI_STATUS EFIAPI EfiLibInstallDriverBindingComponentName2(IN CONST EFI_HANDLE ImageHandle, IN CONST EFI_SYSTEM_TABLE *SystemTable, IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding, IN EFI_HANDLE DriverBindingHandle, IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName OPTIONAL, IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2 OPTIONAL)
EFI_STATUS EFIAPI UsbBusBuildProtocol(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
EFI_STATUS EFIAPI UsbIoAsyncInterruptTransfer(IN EFI_USB_IO_PROTOCOL *This, IN UINT8 Endpoint, IN BOOLEAN IsNewTransfer, IN UINTN PollInterval OPTIONAL, IN UINTN DataLength OPTIONAL, IN EFI_ASYNC_USB_TRANSFER_CALLBACK Callback OPTIONAL, IN VOID *Context OPTIONAL)
EFI_STATUS EFIAPI UsbIoSyncInterruptTransfer(IN EFI_USB_IO_PROTOCOL *This, IN UINT8 Endpoint, IN OUT VOID *Data, IN OUT UINTN *DataLength, IN UINTN Timeout, OUT UINT32 *UsbStatus)
EFI_STATUS EFIAPI UsbBusControllerDriverSupported(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
EFI_STATUS EFIAPI UsbIoGetEndpointDescriptor(IN EFI_USB_IO_PROTOCOL *This, IN UINT8 Index, OUT EFI_USB_ENDPOINT_DESCRIPTOR *Descriptor)
EFI_STATUS EFIAPI UsbIoIsochronousTransfer(IN EFI_USB_IO_PROTOCOL *This, IN UINT8 DeviceEndpoint, IN OUT VOID *Data, IN UINTN DataLength, OUT UINT32 *Status)
EFI_STATUS EFIAPI UsbBusControllerDriverStop(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer)
EFI_STATUS EFIAPI UsbIoGetActiveConfigDescriptor(IN EFI_USB_IO_PROTOCOL *This, OUT EFI_USB_CONFIG_DESCRIPTOR *Descriptor)
EFI_STATUS EFIAPI UsbIoGetInterfaceDescriptor(IN EFI_USB_IO_PROTOCOL *This, OUT EFI_USB_INTERFACE_DESCRIPTOR *Descriptor)
EFI_STATUS EFIAPI UsbIoGetSupportedLanguages(IN EFI_USB_IO_PROTOCOL *This, OUT UINT16 **LangIDTable, OUT UINT16 *TableSize)
EFI_STATUS EFIAPI UsbIoGetStringDescriptor(IN EFI_USB_IO_PROTOCOL *This, IN UINT16 LangID, IN UINT8 StringIndex, OUT CHAR16 **String)
EFI_STATUS EFIAPI UsbBusDriverEntryPoint(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
EFI_STATUS EFIAPI UsbIoAsyncIsochronousTransfer(IN EFI_USB_IO_PROTOCOL *This, IN UINT8 DeviceEndpoint, IN OUT VOID *Data, IN UINTN DataLength, IN EFI_ASYNC_USB_TRANSFER_CALLBACK IsochronousCallBack, IN VOID *Context OPTIONAL)
EFI_STATUS EFIAPI UsbIoGetDeviceDescriptor(IN EFI_USB_IO_PROTOCOL *This, OUT EFI_USB_DEVICE_DESCRIPTOR *Descriptor)
EFI_STATUS EFIAPI UsbBusControllerDriverStart(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
EFI_STATUS EFIAPI UsbIoControlTransfer(IN EFI_USB_IO_PROTOCOL *This, IN EFI_USB_DEVICE_REQUEST *Request, IN EFI_USB_DATA_DIRECTION Direction, IN UINT32 Timeout, IN OUT VOID *Data OPTIONAL, IN UINTN DataLength OPTIONAL, OUT UINT32 *UsbStatus)
EFI_STATUS EFIAPI UsbIoBulkTransfer(IN EFI_USB_IO_PROTOCOL *This, IN UINT8 Endpoint, IN OUT VOID *Data, IN OUT UINTN *DataLength, IN UINTN Timeout, OUT UINT32 *UsbStatus)
EFI_STATUS EFIAPI UsbIoPortReset(IN EFI_USB_IO_PROTOCOL *This)
EFI_STATUS EFIAPI UsbBusAddWantedUsbIoDP(IN EFI_USB_BUS_PROTOCOL *UsbBusId, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
EFI_STATUS EFIAPI UsbBusFreeUsbDPList(IN LIST_ENTRY *UsbIoDPList)
EFI_STATUS EFIAPI UsbBusRecursivelyConnectWantedUsbIo(IN EFI_USB_BUS_PROTOCOL *UsbBusId)
EFI_STATUS UsbBuildDescTable(IN USB_DEVICE *UsbDev)
EFI_USB_STRING_DESCRIPTOR * UsbGetOneString(IN USB_DEVICE *UsbDev, IN UINT8 Index, IN UINT16 LangId)
EFI_STATUS UsbSetConfig(IN USB_DEVICE *UsbDev, IN UINT8 ConfigIndex)
EFI_STATUS UsbSetAddress(IN USB_DEVICE *UsbDev, IN UINT8 Address)
EFI_STATUS UsbGetMaxPacketSize0(IN USB_DEVICE *UsbDev)
VOID UsbFreeDevDesc(IN USB_DEVICE_DESC *DevDesc)
EFI_STATUS UsbSelectConfig(IN USB_DEVICE *Device, IN UINT8 ConfigValue)
EFI_STATUS UsbRemoveDevice(IN USB_DEVICE *Device)
EFI_STATUS UsbRemoveConfig(IN USB_DEVICE *Device)
EFI_STATUS UsbSelectSetting(IN USB_INTERFACE_DESC *IfDesc, IN UINT8 Alternate)
USB_ENDPOINT_DESC * UsbGetEndpointDesc(IN USB_INTERFACE *UsbIf, IN UINT8 EpAddr)
EFI_STATUS UsbHubCtrlClearTTBuffer(IN USB_DEVICE *HubDev, IN UINT8 Port, IN UINT16 DevAddr, IN UINT16 EpNum, IN UINT16 EpType)
EFI_STATUS UsbHcSyncInterruptTransfer(IN USB_BUS *UsbBus, IN UINT8 DevAddr, IN UINT8 EpAddr, IN UINT8 DevSpeed, IN UINTN MaxPacket, IN OUT VOID *Data, IN OUT UINTN *DataLength, IN OUT UINT8 *DataToggle, IN UINTN TimeOut, IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator, OUT UINT32 *UsbResult)
EFI_STATUS UsbHcAsyncInterruptTransfer(IN USB_BUS *UsbBus, IN UINT8 DevAddr, IN UINT8 EpAddr, IN UINT8 DevSpeed, IN UINTN MaxPacket, IN BOOLEAN IsNewTransfer, IN OUT UINT8 *DataToggle, IN UINTN PollingInterval, IN UINTN DataLength, IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator, IN EFI_ASYNC_USB_TRANSFER_CALLBACK Callback, IN VOID *Context OPTIONAL)
EFI_STATUS UsbHcBulkTransfer(IN USB_BUS *UsbBus, IN UINT8 DevAddr, IN UINT8 EpAddr, IN UINT8 DevSpeed, IN UINTN MaxPacket, IN UINT8 BufferNum, IN OUT VOID *Data[], IN OUT UINTN *DataLength, IN OUT UINT8 *DataToggle, IN UINTN TimeOut, IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator, OUT UINT32 *UsbResult)
EFI_STATUS UsbHcControlTransfer(IN USB_BUS *UsbBus, IN UINT8 DevAddr, IN UINT8 DevSpeed, IN UINTN MaxPacket, IN EFI_USB_DEVICE_REQUEST *Request, IN EFI_USB_DATA_DIRECTION Direction, IN OUT VOID *Data, IN OUT UINTN *DataLength, IN UINTN TimeOut, IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator, OUT UINT32 *UsbResult)
UINT8 TranslatorHubAddress
device address
UINT8 TranslatorPortNumber
the port number of the hub that device is connected to.