[USBEHCI_NEW]
authorMichael Martin <michael.martin@reactos.org>
Fri, 29 Apr 2011 06:14:44 +0000 (06:14 +0000)
committerMichael Martin <michael.martin@reactos.org>
Fri, 29 Apr 2011 06:14:44 +0000 (06:14 +0000)
- Set the NakCountReload to 0 in the QueueHead that is set in the Async register, as this is a dead QueueHead marked as halted and does not need it.
- Set the Async register in StartController. Note: The Async and Periodic registers can only be modified when the controller is stopped.
- Driver now works in Qemu.

svn path=/branches/usb-bringup/; revision=51491

drivers/usb/usbehci_new/hardware.cpp

index fbb1176..79b3939 100644 (file)
@@ -417,7 +417,7 @@ CUSBHardwareDevice::PnpStart(
     AsyncQueueHead->EndPointCharacteristics.HeadOfReclamation = TRUE;
     AsyncQueueHead->Token.Bits.Halted = TRUE;
     AsyncQueueHead->EndPointCharacteristics.MaximumPacketLength = 64;
-    AsyncQueueHead->EndPointCharacteristics.NakCountReload = 0xF;
+    AsyncQueueHead->EndPointCharacteristics.NakCountReload = 0;
     AsyncQueueHead->EndPointCharacteristics.EndPointSpeed = QH_ENDPOINT_HIGHSPEED;
     AsyncQueueHead->EndPointCapabilities.NumberOfTransactionPerFrame = 0x03;
 
@@ -439,18 +439,6 @@ CUSBHardwareDevice::PnpStart(
     DPRINT1("Starting Controller\n");
     Status = StartController();
 
-    //
-    // check for success
-    //
-    if (NT_SUCCESS(Status))
-    {
-        //
-        // set async list head
-        //
-        SetAsyncListRegister(AsyncQueueHead->PhysicalAddr);
-    }
-
-
     //
     // done
     //
@@ -560,8 +548,9 @@ CUSBHardwareDevice::StartController(void)
     EHCI_WRITE_REGISTER_ULONG(EHCI_USBSTS, 0x0000001f);
 
     //
-    // FIXME: Assign the AsyncList Register
+    // Assign the AsyncList Register
     //
+    EHCI_WRITE_REGISTER_ULONG(EHCI_ASYNCLISTBASE, AsyncQueueHead->PhysicalAddr);
 
     //
     // Set Schedules to Enable and Interrupt Threshold to 1ms.