diff options
Diffstat (limited to 'sys/dev/usb/controller')
-rw-r--r-- | sys/dev/usb/controller/ehci.c | 38 | ||||
-rw-r--r-- | sys/dev/usb/controller/uhci.c | 34 | ||||
-rw-r--r-- | sys/dev/usb/controller/uss820dci.c | 2 |
3 files changed, 37 insertions, 37 deletions
diff --git a/sys/dev/usb/controller/ehci.c b/sys/dev/usb/controller/ehci.c index 28ad987..12cfe53 100644 --- a/sys/dev/usb/controller/ehci.c +++ b/sys/dev/usb/controller/ehci.c @@ -89,7 +89,7 @@ __FBSDID("$FreeBSD$"); ((ehci_softc_t *)(((uint8_t *)(bus)) - \ ((uint8_t *)&(((ehci_softc_t *)0)->sc_bus)))) -#if USB_DEBUG +#ifdef USB_DEBUG static int ehcidebug = 0; static int ehcinohighspeed = 0; static int ehciiaadbug = 0; @@ -258,7 +258,7 @@ ehci_init(ehci_softc_t *sc) usb_callout_init_mtx(&sc->sc_tmo_pcd, &sc->sc_bus.bus_mtx, 0); usb_callout_init_mtx(&sc->sc_tmo_poll, &sc->sc_bus.bus_mtx, 0); -#if USB_DEBUG +#ifdef USB_DEBUG if (ehciiaadbug) sc->sc_flags |= EHCI_SCFLG_IAADBUG; if (ehcilostintrbug) @@ -486,7 +486,7 @@ ehci_init(ehci_softc_t *sc) usb_bus_mem_flush_all(&sc->sc_bus, &ehci_iterate_hw_softc); -#if USB_DEBUG +#ifdef USB_DEBUG if (ehcidebug) { ehci_dump_sqh(sc, sc->sc_async_p_last); } @@ -685,7 +685,7 @@ ehci_shutdown(ehci_softc_t *sc) } } -#if USB_DEBUG +#ifdef USB_DEBUG static void ehci_dump_regs(ehci_softc_t *sc) { @@ -1229,7 +1229,7 @@ ehci_non_isoc_done_sub(struct usb_xfer *xfer) xfer->td_transfer_cache = td; -#if USB_DEBUG +#ifdef USB_DEBUG if (status & EHCI_QTD_STATERRS) { DPRINTFN(11, "error, addr=%d, endpt=0x%02x, frame=0x%02x" "status=%s%s%s%s%s%s%s%s\n", @@ -1260,7 +1260,7 @@ ehci_non_isoc_done(struct usb_xfer *xfer) DPRINTFN(13, "xfer=%p endpoint=%p transfer done\n", xfer, xfer->endpoint); -#if USB_DEBUG +#ifdef USB_DEBUG if (ehcidebug > 10) { ehci_softc_t *sc = EHCI_BUS2SC(xfer->xroot->bus); @@ -1527,7 +1527,7 @@ ehci_interrupt(ehci_softc_t *sc) DPRINTFN(16, "real interrupt\n"); -#if USB_DEBUG +#ifdef USB_DEBUG if (ehcidebug > 15) { ehci_dump_regs(sc); } @@ -1548,7 +1548,7 @@ ehci_interrupt(ehci_softc_t *sc) if (status & EHCI_STS_HSE) { printf("%s: unrecoverable error, " "controller halted\n", __FUNCTION__); -#if USB_DEBUG +#ifdef USB_DEBUG ehci_dump_regs(sc); ehci_dump_isoc(sc); #endif @@ -1978,7 +1978,7 @@ ehci_setup_standard_chain(struct usb_xfer *xfer, ehci_qh_t **qh_last) xfer->td_transfer_last = td; -#if USB_DEBUG +#ifdef USB_DEBUG if (ehcidebug > 8) { DPRINTF("nexttog=%d; data before transfer:\n", xfer->endpoint->toggle_next); @@ -2106,7 +2106,7 @@ ehci_isoc_fs_done(ehci_softc_t *sc, struct usb_xfer *xfer) if (pp_last >= &sc->sc_isoc_fs_p_last[EHCI_VIRTUAL_FRAMELIST_COUNT]) { pp_last = &sc->sc_isoc_fs_p_last[0]; } -#if USB_DEBUG +#ifdef USB_DEBUG if (ehcidebug > 15) { DPRINTF("isoc FS-TD\n"); ehci_dump_sitd(sc, td); @@ -2160,7 +2160,7 @@ ehci_isoc_hs_done(ehci_softc_t *sc, struct usb_xfer *xfer) if (pp_last >= &sc->sc_isoc_hs_p_last[EHCI_VIRTUAL_FRAMELIST_COUNT]) { pp_last = &sc->sc_isoc_hs_p_last[0]; } -#if USB_DEBUG +#ifdef USB_DEBUG if (ehcidebug > 15) { DPRINTF("isoc HS-TD\n"); ehci_dump_itd(sc, td); @@ -2224,7 +2224,7 @@ ehci_device_done(struct usb_xfer *xfer, usb_error_t error) if ((methods == &ehci_device_bulk_methods) || (methods == &ehci_device_ctrl_methods)) { -#if USB_DEBUG +#ifdef USB_DEBUG if (ehcidebug > 8) { DPRINTF("nexttog=%d; data after transfer:\n", xfer->endpoint->toggle_next); @@ -2509,7 +2509,7 @@ ehci_device_isoc_fs_enter(struct usb_xfer *xfer) uint8_t sb; uint8_t error; -#if USB_DEBUG +#ifdef USB_DEBUG uint8_t once = 1; #endif @@ -2593,7 +2593,7 @@ ehci_device_isoc_fs_enter(struct usb_xfer *xfer) /* reuse sitd_portaddr and sitd_back from last transfer */ if (*plen > xfer->max_frame_size) { -#if USB_DEBUG +#ifdef USB_DEBUG if (once) { once = 0; printf("%s: frame length(%d) exceeds %d " @@ -2683,7 +2683,7 @@ ehci_device_isoc_fs_enter(struct usb_xfer *xfer) } usb_pc_cpu_flush(td->page_cache); -#if USB_DEBUG +#ifdef USB_DEBUG if (ehcidebug > 15) { DPRINTF("FS-TD %d\n", nframes); ehci_dump_sitd(sc, td); @@ -2800,7 +2800,7 @@ ehci_device_isoc_hs_enter(struct usb_xfer *xfer) uint8_t td_no; uint8_t page_no; -#if USB_DEBUG +#ifdef USB_DEBUG uint8_t once = 1; #endif @@ -2878,7 +2878,7 @@ ehci_device_isoc_hs_enter(struct usb_xfer *xfer) } /* range check */ if (*plen > xfer->max_frame_size) { -#if USB_DEBUG +#ifdef USB_DEBUG if (once) { once = 0; printf("%s: frame length(%d) exceeds %d bytes " @@ -2962,7 +2962,7 @@ ehci_device_isoc_hs_enter(struct usb_xfer *xfer) td->itd_status[td_no - 1] |= htohc32(sc, EHCI_ITD_IOC); } usb_pc_cpu_flush(td->page_cache); -#if USB_DEBUG +#ifdef USB_DEBUG if (ehcidebug > 15) { DPRINTF("HS-TD %d\n", nframes); ehci_dump_itd(sc, td); @@ -3398,7 +3398,7 @@ ehci_roothub_exec(struct usb_device *udev, break; case UHF_PORT_RESET: DPRINTFN(6, "reset port %d\n", index); -#if USB_DEBUG +#ifdef USB_DEBUG if (ehcinohighspeed) { /* * Connect USB device to companion diff --git a/sys/dev/usb/controller/uhci.c b/sys/dev/usb/controller/uhci.c index 837a26f..f87907c 100644 --- a/sys/dev/usb/controller/uhci.c +++ b/sys/dev/usb/controller/uhci.c @@ -82,7 +82,7 @@ __FBSDID("$FreeBSD$"); ((uhci_softc_t *)(((uint8_t *)(bus)) - \ ((uint8_t *)&(((uhci_softc_t *)0)->sc_bus)))) -#if USB_DEBUG +#ifdef USB_DEBUG static int uhcidebug = 0; static int uhcinoloop = 0; @@ -459,7 +459,7 @@ uhci_init(uhci_softc_t *sc) usb_callout_init_mtx(&sc->sc_root_intr, &sc->sc_bus.bus_mtx, 0); -#if USB_DEBUG +#ifdef USB_DEBUG if (uhcidebug > 2) { uhci_dumpregs(sc); } @@ -668,7 +668,7 @@ uhci_suspend(uhci_softc_t *sc) { USB_BUS_LOCK(&sc->sc_bus); -#if USB_DEBUG +#ifdef USB_DEBUG if (uhcidebug > 2) { uhci_dumpregs(sc); } @@ -712,7 +712,7 @@ uhci_resume(uhci_softc_t *sc) uhci_start(sc); -#if USB_DEBUG +#ifdef USB_DEBUG if (uhcidebug > 2) { uhci_dumpregs(sc); } @@ -724,7 +724,7 @@ uhci_resume(uhci_softc_t *sc) uhci_do_poll(&sc->sc_bus); } -#if USB_DEBUG +#ifdef USB_DEBUG static void uhci_dumpregs(uhci_softc_t *sc) { @@ -855,7 +855,7 @@ uhci_add_loop(uhci_softc_t *sc) struct uhci_qh *qh_lst; struct uhci_qh *qh_rec; -#if USB_DEBUG +#ifdef USB_DEBUG if (uhcinoloop) { return; } @@ -878,7 +878,7 @@ uhci_rem_loop(uhci_softc_t *sc) { struct uhci_qh *qh_lst; -#if USB_DEBUG +#ifdef USB_DEBUG if (uhcinoloop) { return; } @@ -1046,7 +1046,7 @@ uhci_isoc_done(uhci_softc_t *sc, struct usb_xfer *xfer) if (pp_last >= &sc->sc_isoc_p_last[UHCI_VFRAMELIST_COUNT]) { pp_last = &sc->sc_isoc_p_last[0]; } -#if USB_DEBUG +#ifdef USB_DEBUG if (uhcidebug > 5) { DPRINTF("isoc TD\n"); uhci_dump_td(td); @@ -1177,7 +1177,7 @@ uhci_non_isoc_done_sub(struct usb_xfer *xfer) xfer->endpoint->toggle_next = (token & UHCI_TD_SET_DT(1)) ? 0 : 1; -#if USB_DEBUG +#ifdef USB_DEBUG if (status & UHCI_TD_ERROR) { DPRINTFN(11, "error, addr=%d, endpt=0x%02x, frame=0x%02x " "status=%s%s%s%s%s%s%s%s%s%s%s\n", @@ -1207,7 +1207,7 @@ uhci_non_isoc_done(struct usb_xfer *xfer) DPRINTFN(13, "xfer=%p endpoint=%p transfer done\n", xfer, xfer->endpoint); -#if USB_DEBUG +#ifdef USB_DEBUG if (uhcidebug > 10) { uhci_dump_tds(xfer->td_transfer_first); } @@ -1446,7 +1446,7 @@ uhci_interrupt(uhci_softc_t *sc) DPRINTFN(16, "real interrupt\n"); -#if USB_DEBUG +#ifdef USB_DEBUG if (uhcidebug > 15) { uhci_dumpregs(sc); } @@ -1460,7 +1460,7 @@ uhci_interrupt(uhci_softc_t *sc) UHCI_STS_HCPE | UHCI_STS_HCH)) { if (status & UHCI_STS_RD) { -#if USB_DEBUG +#ifdef USB_DEBUG printf("%s: resume detect\n", __FUNCTION__); #endif @@ -1477,7 +1477,7 @@ uhci_interrupt(uhci_softc_t *sc) /* no acknowledge needed */ DPRINTF("%s: host controller halted\n", __FUNCTION__); -#if USB_DEBUG +#ifdef USB_DEBUG if (uhcidebug > 0) { uhci_dump_all(sc); } @@ -1839,7 +1839,7 @@ uhci_setup_standard_chain(struct usb_xfer *xfer) xfer->td_transfer_last = td; -#if USB_DEBUG +#ifdef USB_DEBUG if (uhcidebug > 8) { DPRINTF("nexttog=%d; data before transfer:\n", xfer->endpoint->toggle_next); @@ -2155,7 +2155,7 @@ uhci_device_isoc_enter(struct usb_xfer *xfer) uint32_t temp; uint32_t *plen; -#if USB_DEBUG +#ifdef USB_DEBUG uint8_t once = 1; #endif @@ -2227,7 +2227,7 @@ uhci_device_isoc_enter(struct usb_xfer *xfer) pp_last = &sc->sc_isoc_p_last[0]; } if (*plen > xfer->max_frame_size) { -#if USB_DEBUG +#ifdef USB_DEBUG if (once) { once = 0; printf("%s: frame length(%d) exceeds %d " @@ -2279,7 +2279,7 @@ uhci_device_isoc_enter(struct usb_xfer *xfer) usb_pc_cpu_flush(td->page_cache); -#if USB_DEBUG +#ifdef USB_DEBUG if (uhcidebug > 5) { DPRINTF("TD %d\n", nframes); uhci_dump_td(td); diff --git a/sys/dev/usb/controller/uss820dci.c b/sys/dev/usb/controller/uss820dci.c index c910c1f..7422169 100644 --- a/sys/dev/usb/controller/uss820dci.c +++ b/sys/dev/usb/controller/uss820dci.c @@ -77,7 +77,7 @@ #define USS820_DCI_PC2SC(pc) \ USS820_DCI_BUS2SC(USB_DMATAG_TO_XROOT((pc)->tag_parent)->bus) -#if USB_DEBUG +#ifdef USB_DEBUG static int uss820dcidebug = 0; SYSCTL_NODE(_hw_usb, OID_AUTO, uss820dci, CTLFLAG_RW, 0, "USB uss820dci"); |