]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.h
Remove the check of signature because the code which looks for the input NotifyHandle...
[mirror_edk2.git] / MdeModulePkg / Bus / Usb / UsbBusDxe / UsbBus.h
index c41c1272fc840a58c47cb596d618553f7744495e..ad2f95261bbda3351f24306fbd939d5bd8a8a335 100644 (file)
@@ -2,7 +2,7 @@
 \r
     Usb Bus Driver Binding and Bus IO Protocol.\r
 \r
-Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2012, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -116,10 +116,10 @@ typedef struct _USB_HUB_API    USB_HUB_API;
 // Send general device request timeout.\r
 // \r
 // The USB Specification 2.0, section 11.24.1 recommends a value of\r
-// 50 milliseconds.  We use a value of 100 milliseconds to work\r
+// 50 milliseconds.  We use a value of 500 milliseconds to work\r
 // around slower hubs and devices.\r
 //\r
-#define USB_GENERAL_DEVICE_REQUEST_TIMEOUT 100\r
+#define USB_GENERAL_DEVICE_REQUEST_TIMEOUT 500\r
 \r
 //\r
 // Send clear feature request timeout, set by experience\r
@@ -138,9 +138,6 @@ typedef struct _USB_HUB_API    USB_HUB_API;
 #define USB_BIT(a)                  ((UINTN)(1 << (a)))\r
 #define USB_BIT_IS_SET(Data, Bit)   ((BOOLEAN)(((Data) & (Bit)) == (Bit)))\r
 \r
-#define EFI_USB_BUS_PROTOCOL_GUID \\r
-          {0x2B2F68CC, 0x0CD2, 0x44cf, {0x8E, 0x8B, 0xBB, 0xA2, 0x0B, 0x1B, 0x5B, 0x75}}\r
-\r
 #define USB_INTERFACE_FROM_USBIO(a) \\r
           CR(a, USB_INTERFACE, UsbIo, USB_INTERFACE_SIGNATURE)\r
 \r
@@ -149,6 +146,8 @@ typedef struct _USB_HUB_API    USB_HUB_API;
 \r
 //\r
 // Used to locate USB_BUS\r
+// UsbBusProtocol is the private protocol.\r
+// gEfiCallerIdGuid will be used as its protocol guid.\r
 //\r
 typedef struct _EFI_USB_BUS_PROTOCOL {\r
   UINT64                    Reserved;\r
@@ -167,7 +166,7 @@ struct _USB_DEVICE {
   //\r
   UINT8                     Speed;\r
   UINT8                     Address;\r
-  UINT                    MaxPacket0;\r
+  UINT32                    MaxPacket0;\r
 \r
   //\r
   // The device's descriptors and its configuration\r
@@ -189,6 +188,7 @@ struct _USB_DEVICE {
   UINT8                     ParentAddr;\r
   USB_INTERFACE             *ParentIf;\r
   UINT8                     ParentPort;       // Start at 0\r
+  UINT8                     Tier;\r
 };\r
 \r
 //\r
@@ -245,11 +245,17 @@ struct _USB_BUS {
   EFI_USB2_HC_PROTOCOL      *Usb2Hc;\r
   EFI_USB_HC_PROTOCOL       *UsbHc;\r
 \r
+  //\r
+  // Recorded the max supported usb devices.\r
+  // XHCI can support up to 255 devices.\r
+  // EHCI/UHCI/OHCI supports up to 127 devices.\r
+  //\r
+  UINT32                    MaxDevices;\r
   //\r
   // An array of device that is on the bus. Devices[0] is\r
   // for root hub. Device with address i is at Devices[i].\r
   //\r
-  USB_DEVICE                *Devices[USB_MAX_DEVICES];\r
+  USB_DEVICE                *Devices[256];\r
 \r
   //\r
   // USB Bus driver need to control the recursive connect policy of the bus, only those wanted\r