summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Bus/Usb/UsbBusDxe/usbbus.h
diff options
context:
space:
mode:
authoryshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524>2007-10-08 06:14:13 +0000
committeryshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524>2007-10-08 06:14:13 +0000
commit41e8ff2781f3ca14f73ef5f39e781ccba8cb373d (patch)
tree8fd7edcbb8c98bf324db6e2b043b3603abf67158 /MdeModulePkg/Bus/Usb/UsbBusDxe/usbbus.h
parentba5711102a63d081cb388289983a0e2734e42fb5 (diff)
downloadedk2-platforms-41e8ff2781f3ca14f73ef5f39e781ccba8cb373d.tar.xz
Fixed unexpected timeout in Usb MassStorage Driver.
Fixed unexpected timeout in Uhci/Ehci driver. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4038 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Bus/Usb/UsbBusDxe/usbbus.h')
-rw-r--r--MdeModulePkg/Bus/Usb/UsbBusDxe/usbbus.h72
1 files changed, 64 insertions, 8 deletions
diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/usbbus.h b/MdeModulePkg/Bus/Usb/UsbBusDxe/usbbus.h
index 4bf9d53015..971e01b47a 100644
--- a/MdeModulePkg/Bus/Usb/UsbBusDxe/usbbus.h
+++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/usbbus.h
@@ -55,22 +55,78 @@ typedef struct _USB_HUB_API USB_HUB_API;
#include "UsbEnumer.h"
enum {
+ USB_MAX_LANG_ID = 16,
+ USB_MAX_INTERFACE = 16,
+ USB_MAX_DEVICES = 128,
+
+ USB_BUS_1_MILLISECOND = 1000,
+
//
- // Time definition
+ // Roothub and hub's polling interval, set by experience,
+ // The unit of roothub is 100us, means 1s as interval, and
+ // the unit of hub is 1ms, means 64ms as interval.
//
- USB_STALL_1_MS = 1000,
- TICKS_PER_MS = 10000U,
- USB_ROOTHUB_POLL_INTERVAL = 1000 * TICKS_PER_MS,
+ USB_ROOTHUB_POLL_INTERVAL = 1000 * 10000U,
USB_HUB_POLL_INTERVAL = 64,
//
- // Maximum definition
+ // Wait for port stable to work, refers to specification
+ // [USB20-9.1.2]
//
- USB_MAX_LANG_ID = 16,
- USB_MAX_INTERFACE = 16,
- USB_MAX_DEVICES = 128,
+ USB_WAIT_PORT_STABLE_STALL = 100 * USB_BUS_1_MILLISECOND,
+
+ //
+ // Wait for port statue reg change, set by experience
+ //
+ USB_WAIT_PORT_STS_CHANGE_STALL = 5 * USB_BUS_1_MILLISECOND,
+
+ //
+ // Wait for set device address, refers to specification
+ // [USB20-9.2.6.3, it says 2ms]
+ //
+ USB_SET_DEVICE_ADDRESS_STALL = 20 * USB_BUS_1_MILLISECOND,
+
+ //
+ // Wait for retry max packet size, set by experience
+ //
+ USB_RETRY_MAX_PACK_SIZE_STALL = 100 * USB_BUS_1_MILLISECOND,
//
+ // Wait for hub port power-on, refers to specification
+ // [USB20-11.23.2]
+ //
+ USB_SET_PORT_POWER_STALL = 2 * USB_BUS_1_MILLISECOND,
+
+ //
+ // Wait for port reset, refers to specification
+ // [USB20-7.1.7.5, it says 10ms for hub and 50ms for
+ // root hub]
+ //
+ USB_SET_PORT_RESET_STALL = 20 * USB_BUS_1_MILLISECOND,
+ USB_SET_ROOT_PORT_RESET_STALL = 50 * USB_BUS_1_MILLISECOND,
+
+ //
+ // Wait for clear roothub port reset, set by experience
+ //
+ USB_CLR_ROOT_PORT_RESET_STALL = 1 * USB_BUS_1_MILLISECOND,
+
+ //
+ // Wait for set roothub port enable, set by experience
+ //
+ USB_SET_ROOT_PORT_ENABLE_STALL = 20 * USB_BUS_1_MILLISECOND,
+
+ //
+ // Send general device request timeout, refers to
+ // specification[USB20-11.24.1]
+ //
+ USB_GENERAL_DEVICE_REQUEST_TIMEOUT = 50 * USB_BUS_1_MILLISECOND,
+
+ //
+ // Send clear feature request timeout, set by experience
+ //
+ USB_CLEAR_FEATURE_REQUEST_TIMEOUT = 10 * USB_BUS_1_MILLISECOND,
+
+ //
// Bus raises TPL to TPL_NOTIFY to serialize all its operations
// to protect shared data structures.
//