summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Bus/Pci/EhciDxe/EhciReg.c
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/Pci/EhciDxe/EhciReg.c
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/Pci/EhciDxe/EhciReg.c')
-rw-r--r--MdeModulePkg/Bus/Pci/EhciDxe/EhciReg.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/EhciReg.c b/MdeModulePkg/Bus/Pci/EhciDxe/EhciReg.c
index 290cb3847a..45b6df5c83 100644
--- a/MdeModulePkg/Bus/Pci/EhciDxe/EhciReg.c
+++ b/MdeModulePkg/Bus/Pci/EhciDxe/EhciReg.c
@@ -214,12 +214,12 @@ EhcWaitOpRegBit (
{
UINT32 Index;
- for (Index = 0; Index < Timeout / EHC_SYNC_POLL_TIME + 1; Index++) {
+ for (Index = 0; Index < Timeout / EHC_SYNC_POLL_INTERVAL + 1; Index++) {
if (EHC_REG_BIT_IS_SET (Ehc, Offset, Bit) == WaitToSet) {
return EFI_SUCCESS;
}
- gBS->Stall (EHC_SYNC_POLL_TIME);
+ gBS->Stall (EHC_SYNC_POLL_INTERVAL);
}
return EFI_TIMEOUT;
@@ -614,14 +614,19 @@ EhcInitHC (
//
EhcSetOpRegBit (Ehc, EHC_CONFIG_FLAG_OFFSET, CONFIGFLAG_ROUTE_EHC);
- Status = EhcEnablePeriodSchd (Ehc, EHC_GENERIC_TIME);
+ //
+ // Wait roothub port power stable
+ //
+ gBS->Stall (EHC_ROOT_PORT_RECOVERY_STALL);
+
+ Status = EhcEnablePeriodSchd (Ehc, EHC_GENERIC_TIMEOUT);
if (EFI_ERROR (Status)) {
EHC_ERROR (("EhcInitHC: failed to enable period schedule\n"));
return Status;
}
- Status = EhcEnableAsyncSchd (Ehc, EHC_GENERIC_TIME);
+ Status = EhcEnableAsyncSchd (Ehc, EHC_GENERIC_TIMEOUT);
if (EFI_ERROR (Status)) {
EHC_ERROR (("EhcInitHC: failed to enable async schedule\n"));