summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/ohci.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/usb/ohci.c')
-rw-r--r--sys/dev/usb/ohci.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c
index 3511324..c699617 100644
--- a/sys/dev/usb/ohci.c
+++ b/sys/dev/usb/ohci.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ohci.c,v 1.118 2001/12/27 18:48:28 augustss Exp $ */
+/* $NetBSD: ohci.c,v 1.119 2001/12/31 12:20:35 augustss Exp $ */
/* $FreeBSD$ */
/*
@@ -1439,6 +1439,10 @@ ohci_softintr(void *v)
}
}
+ if (sc->sc_softwake) {
+ sc->sc_softwake = 0;
+ wakeup(&sc->sc_softwake);
+ }
sc->sc_bus.intr_context--;
DPRINTFN(10,("ohci_softintr: done:\n"));
@@ -2208,11 +2212,13 @@ ohci_abort_xfer(usbd_xfer_handle xfer, usbd_status status)
* use of the xfer. Also make sure the soft interrupt routine
* has run.
*/
- usb_delay_ms(opipe->pipe.device->bus, 1); /* Hardware finishes in 1ms */
- /* XXX should have some communication with softintr() to know
- when it's done */
- usb_delay_ms(opipe->pipe.device->bus, 250);
-
+ usb_delay_ms(opipe->pipe.device->bus, 20); /* Hardware finishes in 1ms */
+ s = splusb();
+ sc->sc_softwake = 1;
+ usb_schedsoftintr(&sc->sc_bus);
+ tsleep(&sc->sc_softwake, PZERO, "ohciab", 0);
+ splx(s);
+
/*
* Step 3: Remove any vestiges of the xfer from the hardware.
* The complication here is that the hardware may have executed
OpenPOWER on IntegriCloud