]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.h
Add more status code in drivers.
[mirror_edk2.git] / MdeModulePkg / Bus / Usb / UsbBusDxe / UsbBus.h
1 /** @file
2
3 Usb Bus Driver Binding and Bus IO Protocol.
4
5 Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>
6 This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
10
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13
14 **/
15
16 #ifndef _EFI_USB_BUS_H_
17 #define _EFI_USB_BUS_H_
18
19
20 #include <Uefi.h>
21
22 #include <Protocol/Usb2HostController.h>
23 #include <Protocol/UsbHostController.h>
24 #include <Protocol/UsbIo.h>
25 #include <Protocol/DevicePath.h>
26
27 #include <Library/BaseLib.h>
28 #include <Library/DebugLib.h>
29 #include <Library/BaseMemoryLib.h>
30 #include <Library/UefiDriverEntryPoint.h>
31 #include <Library/UefiBootServicesTableLib.h>
32 #include <Library/UefiLib.h>
33 #include <Library/DevicePathLib.h>
34 #include <Library/MemoryAllocationLib.h>
35 #include <Library/ReportStatusCodeLib.h>
36
37
38 #include <IndustryStandard/Usb.h>
39
40 typedef struct _USB_DEVICE USB_DEVICE;
41 typedef struct _USB_INTERFACE USB_INTERFACE;
42 typedef struct _USB_BUS USB_BUS;
43 typedef struct _USB_HUB_API USB_HUB_API;
44
45
46 #include "UsbUtility.h"
47 #include "UsbDesc.h"
48 #include "UsbHub.h"
49 #include "UsbEnumer.h"
50
51 //
52 // USB bus timeout experience values
53 //
54
55 #define USB_MAX_LANG_ID 16
56 #define USB_MAX_INTERFACE 16
57 #define USB_MAX_DEVICES 128
58
59 #define USB_BUS_1_MILLISECOND 1000
60
61 //
62 // Roothub and hub's polling interval, set by experience,
63 // The unit of roothub is 100us, means 1s as interval, and
64 // the unit of hub is 1ms, means 64ms as interval.
65 //
66 #define USB_ROOTHUB_POLL_INTERVAL (1000 * 10000U)
67 #define USB_HUB_POLL_INTERVAL 64
68
69 //
70 // Wait for port stable to work, refers to specification
71 // [USB20-9.1.2]
72 //
73 #define USB_WAIT_PORT_STABLE_STALL (100 * USB_BUS_1_MILLISECOND)
74
75 //
76 // Wait for port statue reg change, set by experience
77 //
78 #define USB_WAIT_PORT_STS_CHANGE_STALL (5 * USB_BUS_1_MILLISECOND)
79
80 //
81 // Wait for set device address, refers to specification
82 // [USB20-9.2.6.3, it says 2ms]
83 //
84 #define USB_SET_DEVICE_ADDRESS_STALL (20 * USB_BUS_1_MILLISECOND)
85
86 //
87 // Wait for retry max packet size, set by experience
88 //
89 #define USB_RETRY_MAX_PACK_SIZE_STALL (100 * USB_BUS_1_MILLISECOND)
90
91 //
92 // Wait for hub port power-on, refers to specification
93 // [USB20-11.23.2]
94 //
95 #define USB_SET_PORT_POWER_STALL (2 * USB_BUS_1_MILLISECOND)
96
97 //
98 // Wait for port reset, refers to specification
99 // [USB20-7.1.7.5, it says 10ms for hub and 50ms for
100 // root hub]
101 //
102 #define USB_SET_PORT_RESET_STALL (20 * USB_BUS_1_MILLISECOND)
103 #define USB_SET_ROOT_PORT_RESET_STALL (50 * USB_BUS_1_MILLISECOND)
104
105 //
106 // Wait for clear roothub port reset, set by experience
107 //
108 #define USB_CLR_ROOT_PORT_RESET_STALL (20 * USB_BUS_1_MILLISECOND)
109
110 //
111 // Wait for set roothub port enable, set by experience
112 //
113 #define USB_SET_ROOT_PORT_ENABLE_STALL (20 * USB_BUS_1_MILLISECOND)
114
115 //
116 // Send general device request timeout.
117 //
118 // The USB Specification 2.0, section 11.24.1 recommends a value of
119 // 50 milliseconds. We use a value of 100 milliseconds to work
120 // around slower hubs and devices.
121 //
122 #define USB_GENERAL_DEVICE_REQUEST_TIMEOUT 100
123
124 //
125 // Send clear feature request timeout, set by experience
126 //
127 #define USB_CLEAR_FEATURE_REQUEST_TIMEOUT 10
128
129 //
130 // Bus raises TPL to TPL_NOTIFY to serialize all its operations
131 // to protect shared data structures.
132 //
133 #define USB_BUS_TPL TPL_NOTIFY
134
135 #define USB_INTERFACE_SIGNATURE SIGNATURE_32 ('U', 'S', 'B', 'I')
136 #define USB_BUS_SIGNATURE SIGNATURE_32 ('U', 'S', 'B', 'B')
137
138 #define USB_BIT(a) ((UINTN)(1 << (a)))
139 #define USB_BIT_IS_SET(Data, Bit) ((BOOLEAN)(((Data) & (Bit)) == (Bit)))
140
141 #define EFI_USB_BUS_PROTOCOL_GUID \
142 {0x2B2F68CC, 0x0CD2, 0x44cf, {0x8E, 0x8B, 0xBB, 0xA2, 0x0B, 0x1B, 0x5B, 0x75}}
143
144 #define USB_INTERFACE_FROM_USBIO(a) \
145 CR(a, USB_INTERFACE, UsbIo, USB_INTERFACE_SIGNATURE)
146
147 #define USB_BUS_FROM_THIS(a) \
148 CR(a, USB_BUS, BusId, USB_BUS_SIGNATURE)
149
150 //
151 // Used to locate USB_BUS
152 //
153 typedef struct _EFI_USB_BUS_PROTOCOL {
154 UINT64 Reserved;
155 } EFI_USB_BUS_PROTOCOL;
156
157
158 //
159 // Stands for the real USB device. Each device may
160 // has several seperately working interfaces.
161 //
162 struct _USB_DEVICE {
163 USB_BUS *Bus;
164
165 //
166 // Configuration information
167 //
168 UINT8 Speed;
169 UINT8 Address;
170 UINT8 MaxPacket0;
171
172 //
173 // The device's descriptors and its configuration
174 //
175 USB_DEVICE_DESC *DevDesc;
176 USB_CONFIG_DESC *ActiveConfig;
177
178 UINT16 LangId [USB_MAX_LANG_ID];
179 UINT16 TotalLangId;
180
181 UINT8 NumOfInterface;
182 USB_INTERFACE *Interfaces [USB_MAX_INTERFACE];
183
184 //
185 // Parent child relationship
186 //
187 EFI_USB2_HC_TRANSACTION_TRANSLATOR Translator;
188
189 UINT8 ParentAddr;
190 USB_INTERFACE *ParentIf;
191 UINT8 ParentPort; // Start at 0
192 };
193
194 //
195 // Stands for different functions of USB device
196 //
197 struct _USB_INTERFACE {
198 UINTN Signature;
199 USB_DEVICE *Device;
200 USB_INTERFACE_DESC *IfDesc;
201 USB_INTERFACE_SETTING *IfSetting;
202
203 //
204 // Handles and protocols
205 //
206 EFI_HANDLE Handle;
207 EFI_USB_IO_PROTOCOL UsbIo;
208 EFI_DEVICE_PATH_PROTOCOL *DevicePath;
209 BOOLEAN IsManaged;
210
211 //
212 // Hub device special data
213 //
214 BOOLEAN IsHub;
215 USB_HUB_API *HubApi;
216 UINT8 NumOfPort;
217 EFI_EVENT HubNotify;
218
219 //
220 // Data used only by normal hub devices
221 //
222 USB_ENDPOINT_DESC *HubEp;
223 UINT8 *ChangeMap;
224
225 //
226 // Data used only by root hub to hand over device to
227 // companion UHCI driver if low/full speed devices are
228 // connected to EHCI.
229 //
230 UINT8 MaxSpeed;
231 };
232
233 //
234 // Stands for the current USB Bus
235 //
236 struct _USB_BUS {
237 UINTN Signature;
238 EFI_USB_BUS_PROTOCOL BusId;
239
240 //
241 // Managed USB host controller
242 //
243 EFI_HANDLE HostHandle;
244 EFI_DEVICE_PATH_PROTOCOL *DevicePath;
245 EFI_USB2_HC_PROTOCOL *Usb2Hc;
246 EFI_USB_HC_PROTOCOL *UsbHc;
247
248 //
249 // An array of device that is on the bus. Devices[0] is
250 // for root hub. Device with address i is at Devices[i].
251 //
252 USB_DEVICE *Devices[USB_MAX_DEVICES];
253
254 //
255 // USB Bus driver need to control the recursive connect policy of the bus, only those wanted
256 // usb child device will be recursively connected.
257 //
258 // WantedUsbIoDPList tracks the Usb child devices which user want to recursivly fully connecte,
259 // every wanted child device is stored in a item of the WantedUsbIoDPList, whose structrure is
260 // DEVICE_PATH_LIST_ITEM
261 //
262 LIST_ENTRY WantedUsbIoDPList;
263
264 };
265
266 //
267 // USB Hub Api
268 //
269 struct _USB_HUB_API{
270 USB_HUB_INIT Init;
271 USB_HUB_GET_PORT_STATUS GetPortStatus;
272 USB_HUB_CLEAR_PORT_CHANGE ClearPortChange;
273 USB_HUB_SET_PORT_FEATURE SetPortFeature;
274 USB_HUB_CLEAR_PORT_FEATURE ClearPortFeature;
275 USB_HUB_RESET_PORT ResetPort;
276 USB_HUB_RELEASE Release;
277 };
278
279 #define USB_US_LAND_ID 0x0409
280
281 #define DEVICE_PATH_LIST_ITEM_SIGNATURE SIGNATURE_32('d','p','l','i')
282 typedef struct _DEVICE_PATH_LIST_ITEM{
283 UINTN Signature;
284 LIST_ENTRY Link;
285 EFI_DEVICE_PATH_PROTOCOL *DevicePath;
286 } DEVICE_PATH_LIST_ITEM;
287
288 typedef struct {
289 USB_CLASS_DEVICE_PATH UsbClass;
290 EFI_DEVICE_PATH_PROTOCOL End;
291 } USB_CLASS_FORMAT_DEVICE_PATH;
292
293 /**
294 Free a DEVICE_PATH_LIST_ITEM list.
295
296 @param UsbIoDPList a DEVICE_PATH_LIST_ITEM list pointer.
297
298 @retval EFI_INVALID_PARAMETER If parameters are invalid, return this value.
299 @retval EFI_SUCCESS If free operation is successful, return this value.
300
301 **/
302 EFI_STATUS
303 EFIAPI
304 UsbBusFreeUsbDPList (
305 IN LIST_ENTRY *UsbIoDPList
306 );
307
308 /**
309 Store a wanted usb child device info (its Usb part of device path) which is indicated by
310 RemainingDevicePath in a Usb bus which is indicated by UsbBusId.
311
312 @param UsbBusId Point to EFI_USB_BUS_PROTOCOL interface.
313 @param RemainingDevicePath The remaining device patch.
314
315 @retval EFI_SUCCESS Add operation is successful.
316 @retval EFI_INVALID_PARAMETER The parameters are invalid.
317
318 **/
319 EFI_STATUS
320 EFIAPI
321 UsbBusAddWantedUsbIoDP (
322 IN EFI_USB_BUS_PROTOCOL *UsbBusId,
323 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
324 );
325
326 /**
327 Check whether a usb child device is the wanted device in a bus.
328
329 @param Bus The Usb bus's private data pointer.
330 @param UsbIf The usb child device inferface.
331
332 @retval True If a usb child device is the wanted device in a bus.
333 @retval False If a usb child device is *NOT* the wanted device in a bus.
334
335 **/
336 BOOLEAN
337 EFIAPI
338 UsbBusIsWantedUsbIO (
339 IN USB_BUS *Bus,
340 IN USB_INTERFACE *UsbIf
341 );
342
343 /**
344 Recursively connnect every wanted usb child device to ensure they all fully connected.
345 Check all the child Usb IO handles in this bus, recursively connecte if it is wanted usb child device.
346
347 @param UsbBusId Point to EFI_USB_BUS_PROTOCOL interface.
348
349 @retval EFI_SUCCESS Connect is done successfully.
350 @retval EFI_INVALID_PARAMETER The parameter is invalid.
351
352 **/
353 EFI_STATUS
354 EFIAPI
355 UsbBusRecursivelyConnectWantedUsbIo (
356 IN EFI_USB_BUS_PROTOCOL *UsbBusId
357 );
358
359 /**
360 USB_IO function to execute a control transfer. This
361 function will execute the USB transfer. If transfer
362 successes, it will sync the internal state of USB bus
363 with device state.
364
365 @param This The USB_IO instance
366 @param Request The control transfer request
367 @param Direction Direction for data stage
368 @param Timeout The time to wait before timeout
369 @param Data The buffer holding the data
370 @param DataLength Then length of the data
371 @param UsbStatus USB result
372
373 @retval EFI_INVALID_PARAMETER The parameters are invalid
374 @retval EFI_SUCCESS The control transfer succeded.
375 @retval Others Failed to execute the transfer
376
377 **/
378 EFI_STATUS
379 EFIAPI
380 UsbIoControlTransfer (
381 IN EFI_USB_IO_PROTOCOL *This,
382 IN EFI_USB_DEVICE_REQUEST *Request,
383 IN EFI_USB_DATA_DIRECTION Direction,
384 IN UINT32 Timeout,
385 IN OUT VOID *Data, OPTIONAL
386 IN UINTN DataLength, OPTIONAL
387 OUT UINT32 *UsbStatus
388 );
389
390 /**
391 Execute a bulk transfer to the device endpoint.
392
393 @param This The USB IO instance.
394 @param Endpoint The device endpoint.
395 @param Data The data to transfer.
396 @param DataLength The length of the data to transfer.
397 @param Timeout Time to wait before timeout.
398 @param UsbStatus The result of USB transfer.
399
400 @retval EFI_SUCCESS The bulk transfer is OK.
401 @retval EFI_INVALID_PARAMETER Some parameters are invalid.
402 @retval Others Failed to execute transfer, reason returned in
403 UsbStatus.
404
405 **/
406 EFI_STATUS
407 EFIAPI
408 UsbIoBulkTransfer (
409 IN EFI_USB_IO_PROTOCOL *This,
410 IN UINT8 Endpoint,
411 IN OUT VOID *Data,
412 IN OUT UINTN *DataLength,
413 IN UINTN Timeout,
414 OUT UINT32 *UsbStatus
415 );
416
417 /**
418 Execute a synchronous interrupt transfer.
419
420 @param This The USB IO instance.
421 @param Endpoint The device endpoint.
422 @param Data The data to transfer.
423 @param DataLength The length of the data to transfer.
424 @param Timeout Time to wait before timeout.
425 @param UsbStatus The result of USB transfer.
426
427 @retval EFI_SUCCESS The synchronous interrupt transfer is OK.
428 @retval EFI_INVALID_PARAMETER Some parameters are invalid.
429 @retval Others Failed to execute transfer, reason returned in
430 UsbStatus.
431
432 **/
433 EFI_STATUS
434 EFIAPI
435 UsbIoSyncInterruptTransfer (
436 IN EFI_USB_IO_PROTOCOL *This,
437 IN UINT8 Endpoint,
438 IN OUT VOID *Data,
439 IN OUT UINTN *DataLength,
440 IN UINTN Timeout,
441 OUT UINT32 *UsbStatus
442 );
443
444 /**
445 Queue a new asynchronous interrupt transfer, or remove the old
446 request if (IsNewTransfer == FALSE).
447
448 @param This The USB_IO instance.
449 @param Endpoint The device endpoint.
450 @param IsNewTransfer Whether this is a new request, if it's old, remove
451 the request.
452 @param PollInterval The interval to poll the transfer result, (in ms).
453 @param DataLength The length of perodic data transfer.
454 @param Callback The function to call periodicaly when transfer is
455 ready.
456 @param Context The context to the callback.
457
458 @retval EFI_SUCCESS New transfer is queued or old request is removed.
459 @retval EFI_INVALID_PARAMETER Some parameters are invalid.
460 @retval Others Failed to queue the new request or remove the old
461 request.
462
463 **/
464 EFI_STATUS
465 EFIAPI
466 UsbIoAsyncInterruptTransfer (
467 IN EFI_USB_IO_PROTOCOL *This,
468 IN UINT8 Endpoint,
469 IN BOOLEAN IsNewTransfer,
470 IN UINTN PollInterval, OPTIONAL
471 IN UINTN DataLength, OPTIONAL
472 IN EFI_ASYNC_USB_TRANSFER_CALLBACK Callback, OPTIONAL
473 IN VOID *Context OPTIONAL
474 );
475
476 /**
477 Execute a synchronous isochronous transfer.
478
479 @param This The USB IO instance.
480 @param DeviceEndpoint The device endpoint.
481 @param Data The data to transfer.
482 @param DataLength The length of the data to transfer.
483 @param UsbStatus The result of USB transfer.
484
485 @retval EFI_UNSUPPORTED Currently isochronous transfer isn't supported.
486
487 **/
488 EFI_STATUS
489 EFIAPI
490 UsbIoIsochronousTransfer (
491 IN EFI_USB_IO_PROTOCOL *This,
492 IN UINT8 DeviceEndpoint,
493 IN OUT VOID *Data,
494 IN UINTN DataLength,
495 OUT UINT32 *Status
496 );
497
498 /**
499 Queue an asynchronous isochronous transfer.
500
501 @param This The USB_IO instance.
502 @param DeviceEndpoint The device endpoint.
503 @param Data The data to transfer.
504 @param DataLength The length of perodic data transfer.
505 @param IsochronousCallBack The function to call periodicaly when transfer is
506 ready.
507 @param Context The context to the callback.
508
509 @retval EFI_UNSUPPORTED Currently isochronous transfer isn't supported.
510
511 **/
512 EFI_STATUS
513 EFIAPI
514 UsbIoAsyncIsochronousTransfer (
515 IN EFI_USB_IO_PROTOCOL *This,
516 IN UINT8 DeviceEndpoint,
517 IN OUT VOID *Data,
518 IN UINTN DataLength,
519 IN EFI_ASYNC_USB_TRANSFER_CALLBACK IsochronousCallBack,
520 IN VOID *Context OPTIONAL
521 );
522
523 /**
524 Retrieve the device descriptor of the device.
525
526 @param This The USB IO instance.
527 @param Descriptor The variable to receive the device descriptor.
528
529 @retval EFI_SUCCESS The device descriptor is returned.
530 @retval EFI_INVALID_PARAMETER The parameter is invalid.
531
532 **/
533 EFI_STATUS
534 EFIAPI
535 UsbIoGetDeviceDescriptor (
536 IN EFI_USB_IO_PROTOCOL *This,
537 OUT EFI_USB_DEVICE_DESCRIPTOR *Descriptor
538 );
539
540 /**
541 Return the configuration descriptor of the current active configuration.
542
543 @param This The USB IO instance.
544 @param Descriptor The USB configuration descriptor.
545
546 @retval EFI_SUCCESS The active configuration descriptor is returned.
547 @retval EFI_INVALID_PARAMETER Some parameter is invalid.
548 @retval EFI_NOT_FOUND Currently no active configuration is selected.
549
550 **/
551 EFI_STATUS
552 EFIAPI
553 UsbIoGetActiveConfigDescriptor (
554 IN EFI_USB_IO_PROTOCOL *This,
555 OUT EFI_USB_CONFIG_DESCRIPTOR *Descriptor
556 );
557
558 /**
559 Retrieve the active interface setting descriptor for this USB IO instance.
560
561 @param This The USB IO instance.
562 @param Descriptor The variable to receive active interface setting.
563
564 @retval EFI_SUCCESS The active interface setting is returned.
565 @retval EFI_INVALID_PARAMETER Some parameter is invalid.
566
567 **/
568 EFI_STATUS
569 EFIAPI
570 UsbIoGetInterfaceDescriptor (
571 IN EFI_USB_IO_PROTOCOL *This,
572 OUT EFI_USB_INTERFACE_DESCRIPTOR *Descriptor
573 );
574
575 /**
576 Retrieve the endpoint descriptor from this interface setting.
577
578 @param This The USB IO instance.
579 @param Index The index (start from zero) of the endpoint to
580 retrieve.
581 @param Descriptor The variable to receive the descriptor.
582
583 @retval EFI_SUCCESS The endpoint descriptor is returned.
584 @retval EFI_INVALID_PARAMETER Some parameter is invalid.
585
586 **/
587 EFI_STATUS
588 EFIAPI
589 UsbIoGetEndpointDescriptor (
590 IN EFI_USB_IO_PROTOCOL *This,
591 IN UINT8 Index,
592 OUT EFI_USB_ENDPOINT_DESCRIPTOR *Descriptor
593 );
594
595 /**
596 Retrieve the supported language ID table from the device.
597
598 @param This The USB IO instance.
599 @param LangIDTable The table to return the language IDs.
600 @param TableSize The size, in bytes, of the table LangIDTable.
601
602 @retval EFI_SUCCESS The language ID is return.
603
604 **/
605 EFI_STATUS
606 EFIAPI
607 UsbIoGetSupportedLanguages (
608 IN EFI_USB_IO_PROTOCOL *This,
609 OUT UINT16 **LangIDTable,
610 OUT UINT16 *TableSize
611 );
612
613 /**
614 Retrieve an indexed string in the language of LangID.
615
616 @param This The USB IO instance.
617 @param LangID The language ID of the string to retrieve.
618 @param StringIndex The index of the string.
619 @param String The variable to receive the string.
620
621 @retval EFI_SUCCESS The string is returned.
622 @retval EFI_NOT_FOUND No such string existed.
623
624 **/
625 EFI_STATUS
626 EFIAPI
627 UsbIoGetStringDescriptor (
628 IN EFI_USB_IO_PROTOCOL *This,
629 IN UINT16 LangID,
630 IN UINT8 StringIndex,
631 OUT CHAR16 **String
632 );
633
634 /**
635 Reset the device, then if that succeeds, reconfigure the
636 device with its address and current active configuration.
637
638 @param This The USB IO instance.
639
640 @retval EFI_SUCCESS The device is reset and configured.
641 @retval Others Failed to reset the device.
642
643 **/
644 EFI_STATUS
645 EFIAPI
646 UsbIoPortReset (
647 IN EFI_USB_IO_PROTOCOL *This
648 );
649
650 /**
651 Install Usb Bus Protocol on host controller, and start the Usb bus.
652
653 @param This The USB bus driver binding instance.
654 @param Controller The controller to check.
655 @param RemainingDevicePath The remaining device patch.
656
657 @retval EFI_SUCCESS The controller is controlled by the usb bus.
658 @retval EFI_ALREADY_STARTED The controller is already controlled by the usb bus.
659 @retval EFI_OUT_OF_RESOURCES Failed to allocate resources.
660
661 **/
662 EFI_STATUS
663 EFIAPI
664 UsbBusBuildProtocol (
665 IN EFI_DRIVER_BINDING_PROTOCOL *This,
666 IN EFI_HANDLE Controller,
667 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
668 );
669
670 /**
671 The USB bus driver entry pointer.
672
673 @param ImageHandle The driver image handle.
674 @param SystemTable The system table.
675
676 @return EFI_SUCCESS The component name protocol is installed.
677 @return Others Failed to init the usb driver.
678
679 **/
680 EFI_STATUS
681 EFIAPI
682 UsbBusDriverEntryPoint (
683 IN EFI_HANDLE ImageHandle,
684 IN EFI_SYSTEM_TABLE *SystemTable
685 );
686
687 /**
688 Check whether USB bus driver support this device.
689
690 @param This The USB bus driver binding protocol.
691 @param Controller The controller handle to check.
692 @param RemainingDevicePath The remaining device path.
693
694 @retval EFI_SUCCESS The bus supports this controller.
695 @retval EFI_UNSUPPORTED This device isn't supported.
696
697 **/
698 EFI_STATUS
699 EFIAPI
700 UsbBusControllerDriverSupported (
701 IN EFI_DRIVER_BINDING_PROTOCOL *This,
702 IN EFI_HANDLE Controller,
703 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
704 );
705
706 /**
707 Start to process the controller.
708
709 @param This The USB bus driver binding instance.
710 @param Controller The controller to check.
711 @param RemainingDevicePath The remaining device patch.
712
713 @retval EFI_SUCCESS The controller is controlled by the usb bus.
714 @retval EFI_ALREADY_STARTED The controller is already controlled by the usb
715 bus.
716 @retval EFI_OUT_OF_RESOURCES Failed to allocate resources.
717
718 **/
719 EFI_STATUS
720 EFIAPI
721 UsbBusControllerDriverStart (
722 IN EFI_DRIVER_BINDING_PROTOCOL *This,
723 IN EFI_HANDLE Controller,
724 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
725 );
726
727 /**
728 Stop handle the controller by this USB bus driver.
729
730 @param This The USB bus driver binding protocol.
731 @param Controller The controller to release.
732 @param NumberOfChildren The child of USB bus that opened controller
733 BY_CHILD.
734 @param ChildHandleBuffer The array of child handle.
735
736 @retval EFI_SUCCESS The controller or children are stopped.
737 @retval EFI_DEVICE_ERROR Failed to stop the driver.
738
739 **/
740 EFI_STATUS
741 EFIAPI
742 UsbBusControllerDriverStop (
743 IN EFI_DRIVER_BINDING_PROTOCOL *This,
744 IN EFI_HANDLE Controller,
745 IN UINTN NumberOfChildren,
746 IN EFI_HANDLE *ChildHandleBuffer
747 );
748
749 extern EFI_USB_IO_PROTOCOL mUsbIoProtocol;
750 extern EFI_DRIVER_BINDING_PROTOCOL mUsbBusDriverBinding;
751 extern EFI_COMPONENT_NAME_PROTOCOL mUsbBusComponentName;
752 extern EFI_COMPONENT_NAME2_PROTOCOL mUsbBusComponentName2;
753
754 #endif