diff options
author | joe <joe@FreeBSD.org> | 2002-04-07 15:16:31 +0000 |
---|---|---|
committer | joe <joe@FreeBSD.org> | 2002-04-07 15:16:31 +0000 |
commit | 942f573c8ce5b7ba2c2ddc8937f7358edd2a06b1 (patch) | |
tree | 02efaeb9ce122404ac847d29a68cc143f0e932d0 /sys | |
parent | 4e8d2719f46f9cd366e820d835e29a3a4233c6ea (diff) | |
download | FreeBSD-src-942f573c8ce5b7ba2c2ddc8937f7358edd2a06b1.zip FreeBSD-src-942f573c8ce5b7ba2c2ddc8937f7358edd2a06b1.tar.gz |
MFNetBSD: ohci.c (1.119), ohcivar.h (1.30)
date: 2001/12/31 12:20:35; author: augustss;
Change xfer abort to wait for the softintr to run.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/usb/ohci.c | 18 | ||||
-rw-r--r-- | sys/dev/usb/ohcivar.h | 3 |
2 files changed, 14 insertions, 7 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 diff --git a/sys/dev/usb/ohcivar.h b/sys/dev/usb/ohcivar.h index b57d8cc..e72b94f 100644 --- a/sys/dev/usb/ohcivar.h +++ b/sys/dev/usb/ohcivar.h @@ -1,4 +1,4 @@ -/* $NetBSD: ohcivar.h,v 1.29 2001/11/21 02:41:18 augustss Exp $ */ +/* $NetBSD: ohcivar.h,v 1.30 2001/12/31 12:20:35 augustss Exp $ */ /* $FreeBSD$ */ /* @@ -111,6 +111,7 @@ typedef struct ohci_softc { int sc_noport; u_int8_t sc_addr; /* device address */ u_int8_t sc_conf; /* device configuration */ + char sc_softwake; ohci_soft_ed_t *sc_freeeds; ohci_soft_td_t *sc_freetds; |