From 07dbb71da097978ccdfc95b3d2e6522a3a1adba6 Mon Sep 17 00:00:00 2001 From: Michael Martin Date: Fri, 29 Apr 2011 06:14:44 +0000 Subject: [PATCH] [USBEHCI_NEW] - 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 | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/drivers/usb/usbehci_new/hardware.cpp b/drivers/usb/usbehci_new/hardware.cpp index fbb11760dd7..79b393941eb 100644 --- a/drivers/usb/usbehci_new/hardware.cpp +++ b/drivers/usb/usbehci_new/hardware.cpp @@ -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.