Modules/UHCI - More verbose interrupt messages (x86_64 debugging)
authorJohn Hodge <[email protected]>
Sun, 27 May 2012 10:27:24 +0000 (18:27 +0800)
committerJohn Hodge <[email protected]>
Sun, 27 May 2012 10:27:24 +0000 (18:27 +0800)
KernelLand/Modules/USB/Core/usb_devinit.c
KernelLand/Modules/USB/UHCI/uhci.c

index 416e2ba..7eb55f9 100644 (file)
@@ -13,7 +13,7 @@
 #include "usb_proto.h"
 #include "usb_lowlevel.h"
 
 #include "usb_proto.h"
 #include "usb_lowlevel.h"
 
-#define DUMP_DESCRIPTORS       0
+#define DUMP_DESCRIPTORS       1
 
 // === PROTOTYPES ===
 void   USB_DeviceConnected(tUSBHub *Hub, int Port);
 
 // === PROTOTYPES ===
 void   USB_DeviceConnected(tUSBHub *Hub, int Port);
index 55f33dd..e57a1c3 100644 (file)
@@ -856,6 +856,7 @@ void UHCI_InterruptHandler(int IRQ, void *Ptr)
        Uint16  status = _InWord(Host, USBSTS);
        
        LOG("%p: status = 0x%04x", Ptr, status);
        Uint16  status = _InWord(Host, USBSTS);
        
        LOG("%p: status = 0x%04x", Ptr, status);
+       
        // Interrupt-on-completion
        if( status & 1 )
        {
        // Interrupt-on-completion
        if( status & 1 )
        {
@@ -863,6 +864,31 @@ void UHCI_InterruptHandler(int IRQ, void *Ptr)
                Semaphore_Signal(&gUHCI_InterruptSempahore, 1);
        }
 
                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);
 }
 
        _OutWord(Host, USBSTS, status);
 }
 

UCC git Repository :: git.ucc.asn.au