diff options
Diffstat (limited to 'sys/dev/usb/ohci.c')
-rw-r--r-- | sys/dev/usb/ohci.c | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c index 31b6080..334a998 100644 --- a/sys/dev/usb/ohci.c +++ b/sys/dev/usb/ohci.c @@ -75,9 +75,18 @@ #include <machine/clock.h> #define delay(d) DELAY(d) +#endif +#ifdef OHCI_DEBUG +#define DPRINTF(x) if (ohcidebug) logprintf x +#define DPRINTFN(n,x) if (ohcidebug>(n)) logprintf x +int ohcidebug = 1; +#else +#define DPRINTF(x) +#define DPRINTFN(n,x) #endif + /* * The OHCI controller is little endian, so on big endian machines * the data strored in memory needs to be swapped. @@ -145,7 +154,7 @@ int ohci_str __P((usb_string_descriptor_t *, int, char *)); void ohci_timeout __P((void *)); void ohci_rhsc_able __P((ohci_softc_t *, int)); -#ifdef USB_DEBUG +#ifdef UHCI_DEBUG ohci_softc_t *thesc; void ohci_dumpregs __P((ohci_softc_t *)); void ohci_dump_tds __P((ohci_soft_td_t *)); @@ -458,7 +467,7 @@ ohci_init(sc) r = USBD_IOERROR; goto bad3; } -#ifdef USB_DEBUG +#ifdef UHCI_DEBUG thesc = sc; if (ohcidebug > 15) ohci_dumpregs(sc); @@ -494,7 +503,7 @@ ohci_init(sc) sc->sc_noport = OHCI_GET_NDP(OREAD4(sc, OHCI_RH_DESCRIPTOR_A)); -#ifdef USB_DEBUG +#ifdef UHCI_DEBUG if (ohcidebug > 5) ohci_dumpregs(sc); #endif @@ -515,7 +524,7 @@ ohci_init(sc) return (r); } -#ifdef USB_DEBUG +#ifdef UHCI_DEBUG void ohcidump(void); void ohcidump(void) { ohci_dumpregs(thesc); } @@ -650,7 +659,7 @@ ohci_rhsc_able(sc, on) } } -#ifdef USB_DEBUG +#ifdef UHCI_DEBUG char *ohci_cc_strs[] = { "NO_ERROR", "CRC", @@ -686,7 +695,7 @@ ohci_process_done(sc, done) sdone = std; } -#ifdef USB_DEBUG +#ifdef UHCI_DEBUG if (ohcidebug > 10) { printf("ohci_process_done: TD done:\n"); ohci_dump_tds(sdone); @@ -937,7 +946,7 @@ ohci_waitintr(sc, reqh) usb_delay_ms(&sc->sc_bus, 1); intrs = OREAD4(sc, OHCI_INTERRUPT_STATUS) & sc->sc_eintrs; DPRINTFN(15,("ohci_waitintr: 0x%04x\n", intrs)); -#ifdef USB_DEBUG +#ifdef UHCI_DEBUG if (ohcidebug > 15) ohci_dumpregs(sc); #endif @@ -1065,7 +1074,7 @@ ohci_device_request(reqh) reqh->hcpriv = stat; -#if USB_DEBUG +#if UHCI_DEBUG if (ohcidebug > 5) { printf("ohci_device_request:\n"); ohci_dump_ed(sed); @@ -1088,7 +1097,7 @@ ohci_device_request(reqh) } splx(s); -#if USB_DEBUG +#if UHCI_DEBUG if (ohcidebug > 5) { delay(5000); printf("ohci_device_request: status=%x\n", @@ -1206,7 +1215,7 @@ ohci_timeout(addr) #endif } -#ifdef USB_DEBUG +#ifdef UHCI_DEBUG void ohci_dump_tds(std) ohci_soft_td_t *std; @@ -2071,7 +2080,7 @@ ohci_device_intr_start(reqh) reqh->hcpriv = xfer; -#if USB_DEBUG +#if UHCI_DEBUG if (ohcidebug > 5) { printf("ohci_device_intr_transfer:\n"); ohci_dump_ed(sed); @@ -2092,7 +2101,7 @@ ohci_device_intr_start(reqh) #endif sed->ed->ed_flags &= LE(~OHCI_ED_SKIP); -#ifdef USB_DEBUG +#ifdef UHCI_DEBUG if (ohcidebug > 5) { delay(5000); printf("ohci_device_intr_transfer: status=%x\n", |