From 27a04819e703435aa9e986d9093955cb08617144 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Tue, 7 Feb 2012 02:22:34 +0000 Subject: [PATCH] [USBEHCI] - Wait for periodic scheduling to start - Increase the wait interval for asynchronous scheduling to start svn path=/branches/usb-bringup-trunk/; revision=55477 --- drivers/usb/usbehci_new/hardware.cpp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/drivers/usb/usbehci_new/hardware.cpp b/drivers/usb/usbehci_new/hardware.cpp index 300d2db9620..5162c1eb692 100644 --- a/drivers/usb/usbehci_new/hardware.cpp +++ b/drivers/usb/usbehci_new/hardware.cpp @@ -714,19 +714,26 @@ CUSBHardwareDevice::StartController(void) // for (FailSafe = 100; FailSafe > 1; FailSafe--) { - KeStallExecutionProcessor(10); + KeStallExecutionProcessor(100); UsbSts = EHCI_READ_REGISTER_ULONG(EHCI_USBSTS); - if (!(UsbSts & EHCI_STS_HALT)) + if (!(UsbSts & EHCI_STS_HALT) && (UsbSts & EHCI_STS_PSS)) { break; } } - if (UsbSts & EHCI_STS_HALT) { DPRINT1("Could not start execution on the controller\n"); + ASSERT(FALSE); + return STATUS_UNSUCCESSFUL; + } + + if (!(UsbSts & EHCI_STS_PSS)) + { + DPRINT1("Could not enable periodic scheduling\n"); + ASSERT(FALSE); return STATUS_UNSUCCESSFUL; } @@ -755,7 +762,7 @@ CUSBHardwareDevice::StartController(void) // for (FailSafe = 100; FailSafe > 1; FailSafe--) { - KeStallExecutionProcessor(10); + KeStallExecutionProcessor(100); UsbSts = EHCI_READ_REGISTER_ULONG(EHCI_USBSTS); if ((UsbSts & EHCI_STS_ASS)) @@ -1282,7 +1289,7 @@ EhciDefferedRoutine( This = (CUSBHardwareDevice*) SystemArgument1; CStatus = (ULONG) SystemArgument2; - DPRINT("CStatus %x\n", CStatus); + DPRINT("CStatus %x\n", CStatus); // // check for completion of async schedule