Author: cgutman
Date: Tue Feb  7 02:22:34 2012
New Revision: 55477

URL: http://svn.reactos.org/svn/reactos?rev=55477&view=rev
Log:
[USBEHCI]
- Wait for periodic scheduling to start
- Increase the wait interval for asynchronous scheduling to start

Modified:
    branches/usb-bringup-trunk/drivers/usb/usbehci_new/hardware.cpp

Modified: branches/usb-bringup-trunk/drivers/usb/usbehci_new/hardware.cpp
URL: 
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/usb/usbehci_new/hardware.cpp?rev=55477&r1=55476&r2=55477&view=diff
==============================================================================
--- branches/usb-bringup-trunk/drivers/usb/usbehci_new/hardware.cpp 
[iso-8859-1] (original)
+++ branches/usb-bringup-trunk/drivers/usb/usbehci_new/hardware.cpp 
[iso-8859-1] Tue Feb  7 02:22:34 2012
@@ -714,22 +714,29 @@
     //
     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;
+    }
+
     //
     // Assign the AsyncList Register
     //
@@ -755,7 +762,7 @@
     //
     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 @@
     This = (CUSBHardwareDevice*) SystemArgument1;
     CStatus = (ULONG) SystemArgument2;
 
-       DPRINT("CStatus %x\n", CStatus);
+    DPRINT("CStatus %x\n", CStatus);
 
     //
     // check for completion of async schedule


Reply via email to