From 41e8ff2781f3ca14f73ef5f39e781ccba8cb373d Mon Sep 17 00:00:00 2001 From: yshang1 Date: Mon, 8 Oct 2007 06:14:13 +0000 Subject: 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 --- MdeModulePkg/Bus/Pci/UhciDxe/Uhci.h | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) (limited to 'MdeModulePkg/Bus/Pci/UhciDxe/Uhci.h') diff --git a/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.h b/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.h index 3f2540faf7..e7b4447def 100644 --- a/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.h +++ b/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.h @@ -51,25 +51,43 @@ typedef struct _USB_HC_DEV USB_HC_DEV; #include "UhciDebug.h" enum { + UHC_1_MICROSECOND = 1, + UHC_1_MILLISECOND = 1000 * UHC_1_MICROSECOND, + UHC_1_SECOND = 1000 * UHC_1_MILLISECOND, + + // + // UHCI register operation timeout, set by experience // - // Stall times + UHC_GENERIC_TIMEOUT = UHC_1_SECOND, + // - STALL_1_MS = 1000, - STALL_1_SECOND = 1000 *STALL_1_MS, + // Wait for force global resume(FGR) complete, refers to + // specification[UHCI11-2.1.1] + // + UHC_FORCE_GLOBAL_RESUME_STALL = 20 * UHC_1_MILLISECOND, - UHC_SYN_POLL = 50, - FORCE_GLOBAL_RESUME_TIME = 20 *STALL_1_MS, - ROOT_PORT_REST_TIME = 50 *STALL_1_MS, - PORT_RESET_RECOVERY_TIME = 10 *STALL_1_MS, - INTERRUPT_POLLING_TIME = 50 * 10000UL, + // + // Wait for roothub port reset and recovery, reset stall + // is set by experience, and recovery stall refers to + // specification[UHCI11-2.1.1] + // + UHC_ROOT_PORT_RESET_STALL = 50 * UHC_1_MILLISECOND, + UHC_ROOT_PORT_RECOVERY_STALL = 10 * UHC_1_MILLISECOND, + // + // Sync and Async transfer polling interval, set by experience, + // and the unit of Async is 100us. + // + UHC_SYNC_POLL_INTERVAL = 50 * UHC_1_MICROSECOND, + UHC_ASYNC_POLL_INTERVAL = 50 * 10000UL, + // // UHC raises TPL to TPL_NOTIFY to serialize all its operations // to protect shared data structures. // UHCI_TPL = TPL_NOTIFY, - USB_HC_DEV_SIGNATURE = EFI_SIGNATURE_32 ('u', 'h', 'c', 'i') + USB_HC_DEV_SIGNATURE = EFI_SIGNATURE_32 ('u', 'h', 'c', 'i'), }; #pragma pack(1) -- cgit v1.2.3