From b217d78def111414bb8abe427f4797ee61729b83 Mon Sep 17 00:00:00 2001 From: joe Date: Sun, 20 Jan 2002 23:48:43 +0000 Subject: Merge from NetBSD: revision 1.125 date: 2000/09/23 21:00:10; author: augustss; state: Exp; lines: +19 -3 Avoid "bandwidth reclamation" for control transfers. The kue device chokes on it. --- sys/dev/usb/uhci.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'sys/dev/usb/uhci.c') diff --git a/sys/dev/usb/uhci.c b/sys/dev/usb/uhci.c index 036773e..147e81d 100644 --- a/sys/dev/usb/uhci.c +++ b/sys/dev/usb/uhci.c @@ -77,6 +77,9 @@ #include #include +/* Use bandwidth reclamation for control transfers. Some devices choke on it. */ +/*#define UHCI_CTL_LOOP */ + #if defined(__FreeBSD__) #include @@ -910,8 +913,12 @@ uhci_free_intr_info(uhci_intr_info_t *ii) */ void uhci_add_loop(uhci_softc_t *sc) { +#ifdef UHCI_DEBUG + if (uhcinoloop) + return; +#endif if (++sc->sc_loops == 1) { - DPRINTFN(10,("uhci_start_loop: add\n")); + DPRINTFN(5,("uhci_start_loop: add\n")); /* Note, we don't loop back the soft pointer. */ sc->sc_last_qh->qh.qh_hlink = htole32(sc->sc_hctl_start->physaddr | UHCI_PTR_QH); @@ -920,6 +927,10 @@ uhci_add_loop(uhci_softc_t *sc) { void uhci_rem_loop(uhci_softc_t *sc) { +#ifdef UHCI_DEBUG + if (uhcinoloop) + return; +#endif if (--sc->sc_loops == 0) { DPRINTFN(5,("uhci_end_loop: remove\n")); sc->sc_last_qh->qh.qh_hlink = htole32(UHCI_PTR_T); @@ -941,7 +952,9 @@ uhci_add_hs_ctrl(uhci_softc_t *sc, uhci_soft_qh_t *sqh) eqh->hlink = sqh; eqh->qh.qh_hlink = htole32(sqh->physaddr | UHCI_PTR_QH); sc->sc_hctl_end = sqh; +#ifdef UHCI_CTL_LOOP uhci_add_loop(sc); +#endif } /* Remove high speed control QH, called at splusb(). */ @@ -953,7 +966,9 @@ uhci_remove_hs_ctrl(uhci_softc_t *sc, uhci_soft_qh_t *sqh) SPLUSBCHECK; DPRINTFN(10, ("uhci_remove_hs_ctrl: sqh=%p\n", sqh)); +#ifdef UHCI_CTL_LOOP uhci_rem_loop(sc); +#endif /* * The T bit should be set in the elink of the QH so that the HC * doesn't follow the pointer. This condition may fail if the -- cgit v1.1