X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=KernelLand%2FModules%2FUSB%2FEHCI%2Fehci.c;h=d202d067a5327e275c4c808bedad7e6fb6e42898;hb=802762ae7efd39786c0e134ed0bdfe8100d97230;hp=db1f3e37efd7492fb03bf6a5f5be91602705c164;hpb=de6091a10d2cdded5e58f25ba3e3db7db726d01d;p=tpg%2Facess2.git diff --git a/KernelLand/Modules/USB/EHCI/ehci.c b/KernelLand/Modules/USB/EHCI/ehci.c index db1f3e37..d202d067 100644 --- a/KernelLand/Modules/USB/EHCI/ehci.c +++ b/KernelLand/Modules/USB/EHCI/ehci.c @@ -258,11 +258,11 @@ int EHCI_InitController(tPAddr BaseAddress, Uint8 InterruptNum) _error: cont->PhysBase = 0; if( cont->CapRegs ) - MM_Deallocate( (tVAddr)cont->CapRegs ); + MM_Deallocate( cont->CapRegs ); if( cont->PeriodicQueue ) - MM_Deallocate( (tVAddr)cont->PeriodicQueue ); + MM_Deallocate( cont->PeriodicQueue ); if( cont->TDPool ) - MM_Deallocate( (tVAddr)cont->TDPool ); + MM_Deallocate( cont->TDPool ); LEAVE('i', 2); return 2; } @@ -888,6 +888,8 @@ void EHCI_int_ReclaimQHs(tEHCI_Controller *Cont) LOG("Calling %p(%p) for EndPt %x (%p+0x%x)", qh->Impl.Callback, qh->Impl.CallbackData, qh->Impl.Endpt->EndpointID, last->Impl.Ptr, transferred_len); + //if( last->Impl.Ptr ) + // Debug_HexDump("EHCI Callback Data", last->Impl.Ptr, transferred_len); qh->Impl.Callback(qh->Impl.CallbackData, last->Impl.Ptr, transferred_len); } @@ -899,6 +901,7 @@ void EHCI_int_ReclaimQHs(tEHCI_Controller *Cont) void EHCI_int_InterruptThread(void *ControllerPtr) { tEHCI_Controller *Cont = ControllerPtr; + Threads_SetName("EHCI Interrupt Worker"); while(Cont->OpRegs) { Uint32 events; @@ -918,9 +921,8 @@ void EHCI_int_InterruptThread(void *ControllerPtr) if( events & EHCI_THREADEVENT_IOC ) { // IOC, handle completed requests - Log_Warning("EHCI", "%P IOC - TODO: Call registered callbacks and reclaim", - Cont->PhysBase); // Search periodic lists for one that fired + EHCI_int_CheckInterruptQHs(Cont); // Retire QHs // - Remove them from the queue and ask the controller to bell when they're removable EHCI_int_RetireQHs(Cont);