]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.h
MdeModulePkg/UsbBusDxe: Timing tunning for better boot performance.
[mirror_edk2.git] / MdeModulePkg / Bus / Usb / UsbBusDxe / UsbBus.h
index f6e323239a46fe5223c2c983e2b5b83a1dc21311..094aea21cd13263cc911387305e7d082f58b4d69 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
@@ -60,10 +60,10 @@ typedef struct _USB_HUB_API    USB_HUB_API;
 \r
 //\r
 // Roothub and hub's polling interval, set by experience,\r
-// The unit of roothub is 100us, means 1s as interval, and\r
+// The unit of roothub is 100us, means 100ms as interval, and\r
 // the unit of hub is 1ms, means 64ms as interval.\r
 //\r
-#define USB_ROOTHUB_POLL_INTERVAL (1000 * 10000U)\r
+#define USB_ROOTHUB_POLL_INTERVAL (100 * 10000U)\r
 #define USB_HUB_POLL_INTERVAL     64\r
 \r
 //\r
@@ -75,13 +75,13 @@ typedef struct _USB_HUB_API    USB_HUB_API;
 //\r
 // Wait for port statue reg change, set by experience\r
 //\r
-#define USB_WAIT_PORT_STS_CHANGE_STALL (5 * USB_BUS_1_MILLISECOND)\r
+#define USB_WAIT_PORT_STS_CHANGE_STALL (100)\r
 \r
 //\r
 // Wait for set device address, refers to specification\r
 // [USB20-9.2.6.3, it says 2ms]\r
 //\r
-#define USB_SET_DEVICE_ADDRESS_STALL   (20 * USB_BUS_1_MILLISECOND)\r
+#define USB_SET_DEVICE_ADDRESS_STALL   (2 * USB_BUS_1_MILLISECOND)\r
 \r
 //\r
 // Wait for retry max packet size, set by experience\r
@@ -99,7 +99,7 @@ typedef struct _USB_HUB_API    USB_HUB_API;
 // [USB20-7.1.7.5, it says 10ms for hub and 50ms for\r
 // root hub]\r
 //\r
-#define USB_SET_PORT_RESET_STALL       (20 * USB_BUS_1_MILLISECOND)\r
+#define USB_SET_PORT_RESET_STALL       (10 * USB_BUS_1_MILLISECOND)\r
 #define USB_SET_ROOT_PORT_RESET_STALL  (50 * USB_BUS_1_MILLISECOND)\r
 \r
 //\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