From: John Hodge (sonata) Date: Sun, 18 Nov 2012 05:40:22 +0000 (+0800) Subject: Modules/UHCI - Debugging x86_64 errors X-Git-Tag: rel0.15~653 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=e022f09f7dbcf05f388ab41362749694d8b31b25;p=tpg%2Facess2.git Modules/UHCI - Debugging x86_64 errors --- diff --git a/KernelLand/Modules/USB/UHCI/uhci.c b/KernelLand/Modules/USB/UHCI/uhci.c index 5a7faa0e..f2ecf2ad 100644 --- a/KernelLand/Modules/USB/UHCI/uhci.c +++ b/KernelLand/Modules/USB/UHCI/uhci.c @@ -983,26 +983,38 @@ void UHCI_InterruptHandler(int IRQ, void *Ptr) // USB Error Interrupt if( status & 2 ) { - + Log_Notice("UHCI", "USB Error"); } // Resume Detect // - Fired if in suspend state and a USB device sends the RESUME signal if( status & 4 ) { - + Log_Notice("UHCI", "Resume Detect"); } // Host System Error if( status & 8 ) { - + Log_Notice("UHCI", "Host System Error"); } // Host Controller Process Error if( status & 0x10 ) { Log_Error("UHCI", "Host controller process error on controller %p", Ptr); + // Spam Tree + //for( int i = 0; i < 1024; i += 4 ) { + // LOG("%4i: %x", i, Host->FrameList[i]); + //} + + tPAddr phys = Host->TDQHPage->ControlQH.Child; + while( !(phys & 1) && MM_GetRefCount(phys & ~15)) + { + tUHCI_TD *td = UHCI_int_GetTDFromPhys(Host, phys); + LOG("%08P: %08x %08x %08x", phys, td->Control, td->Token, td->BufferPointer); + phys = td->Link; + } } _OutWord(Host, USBSTS, status);