diff options
author | joe <joe@FreeBSD.org> | 2002-09-30 17:50:18 +0000 |
---|---|---|
committer | joe <joe@FreeBSD.org> | 2002-09-30 17:50:18 +0000 |
commit | 9b80ac7383aeb8ff680907bc091d45fc935d4eec (patch) | |
tree | f99522c62b99212707db1a2b0a975eb3d62df114 /sys/dev/usb/uhci.c | |
parent | 3264749d81dcb91903b58d22830f020d8bfe348b (diff) | |
download | FreeBSD-src-9b80ac7383aeb8ff680907bc091d45fc935d4eec.zip FreeBSD-src-9b80ac7383aeb8ff680907bc091d45fc935d4eec.tar.gz |
In rev 1.51 of usb_port.h I switched over to using the USB_USE_SOFTINTR
code path to fix a bug in the non USB_USE_SOFTINTR path that caused
the usb bus to hang and generally misbehave when devices were unplugged.
In the process though it also reduced the throughput of usb devices because
of a less than optimal implementation under FreeBSD.
This commit fixes the non USB_USE_SOFTINTR code in uhci and ohci
so that it works again, and switches back to using this code path.
The uhci code has been tested, but the ohci code hasn't. It's
essentially the same anyway and so I don't envisage any difficulties.
Code for uhci submitted by: Maksim Yevmenkin <myevmenk@exodus.net>
Diffstat (limited to 'sys/dev/usb/uhci.c')
-rw-r--r-- | sys/dev/usb/uhci.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/dev/usb/uhci.c b/sys/dev/usb/uhci.c index 382c295..c96294a 100644 --- a/sys/dev/usb/uhci.c +++ b/sys/dev/usb/uhci.c @@ -1268,10 +1268,12 @@ uhci_softintr(void *v) LIST_FOREACH(ii, &sc->sc_intrhead, list) uhci_check_intr(sc, ii); +#ifdef USB_USE_SOFTINTR if (sc->sc_softwake) { sc->sc_softwake = 0; wakeup(&sc->sc_softwake); } +#endif /* USB_USE_SOFTINTR */ sc->sc_bus.intr_context--; } @@ -1927,10 +1929,14 @@ uhci_abort_xfer(usbd_xfer_handle xfer, usbd_status status) */ usb_delay_ms(upipe->pipe.device->bus, 2); /* Hardware finishes in 1ms */ s = splusb(); +#ifdef USB_USE_SOFTINTR sc->sc_softwake = 1; +#endif /* USB_USE_SOFTINTR */ usb_schedsoftintr(&sc->sc_bus); +#ifdef USB_USE_SOFTINTR DPRINTFN(1,("uhci_abort_xfer: tsleep\n")); tsleep(&sc->sc_softwake, PZERO, "uhciab", 0); +#endif /* USB_USE_SOFTINTR */ splx(s); /* |