From: John Hodge Date: Sun, 27 May 2012 10:27:24 +0000 (+0800) Subject: Modules/UHCI - More verbose interrupt messages (x86_64 debugging) X-Git-Tag: rel0.15~611^2~65 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=bce1f445f4d3836e12d07591d00537981e75439a;p=tpg%2Facess2.git Modules/UHCI - More verbose interrupt messages (x86_64 debugging) --- diff --git a/KernelLand/Modules/USB/Core/usb_devinit.c b/KernelLand/Modules/USB/Core/usb_devinit.c index 416e2ba0..7eb55f9d 100644 --- a/KernelLand/Modules/USB/Core/usb_devinit.c +++ b/KernelLand/Modules/USB/Core/usb_devinit.c @@ -13,7 +13,7 @@ #include "usb_proto.h" #include "usb_lowlevel.h" -#define DUMP_DESCRIPTORS 0 +#define DUMP_DESCRIPTORS 1 // === PROTOTYPES === void USB_DeviceConnected(tUSBHub *Hub, int Port); diff --git a/KernelLand/Modules/USB/UHCI/uhci.c b/KernelLand/Modules/USB/UHCI/uhci.c index 55f33ddd..e57a1c30 100644 --- a/KernelLand/Modules/USB/UHCI/uhci.c +++ b/KernelLand/Modules/USB/UHCI/uhci.c @@ -856,6 +856,7 @@ void UHCI_InterruptHandler(int IRQ, void *Ptr) Uint16 status = _InWord(Host, USBSTS); LOG("%p: status = 0x%04x", Ptr, status); + // Interrupt-on-completion if( status & 1 ) { @@ -863,6 +864,31 @@ void UHCI_InterruptHandler(int IRQ, void *Ptr) Semaphore_Signal(&gUHCI_InterruptSempahore, 1); } + // USB Error Interrupt + if( status & 2 ) + { + + } + + // Resume Detect + // - Fired if in suspend state and a USB device sends the RESUME signal + if( status & 4 ) + { + + } + + // Host System Error + if( status & 8 ) + { + + } + + // Host Controller Process Error + if( status & 0x10 ) + { + Log_Error("UHCI", "Host controller process error on controller %p", Ptr); + } + _OutWord(Host, USBSTS, status); }