diff options
| author | augustss <augustss@NetBSD.org> | 2002-09-29 20:58:25 +0000 |
|---|---|---|
| committer | augustss <augustss@NetBSD.org> | 2002-09-29 20:58:25 +0000 |
| commit | 25ff7d8c331ab06b91b4c018584daf39848af2e4 (patch) | |
| tree | b688bfc9a8c7a16b2f62da4ca918f334e8ad873b /sys/dev | |
| parent | f0d8fa7f7df09b6a7282c59f56bd320229d98b33 (diff) | |
Add some spl calls to protect critical regions. From kern/18440,
Takeshi Nakayama.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/usb/ohci.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c index f617e4b91c3..0b1e985fc23 100644 --- a/sys/dev/usb/ohci.c +++ b/sys/dev/usb/ohci.c @@ -1,4 +1,4 @@ -/* $NetBSD: ohci.c,v 1.128 2002/09/27 15:37:35 provos Exp $ */ +/* $NetBSD: ohci.c,v 1.129 2002/09/29 20:58:25 augustss Exp $ */ /* $FreeBSD: src/sys/dev/usb/ohci.c,v 1.22 1999/11/17 22:33:40 n_hibma Exp $ */ /* @@ -46,7 +46,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.128 2002/09/27 15:37:35 provos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.129 2002/09/29 20:58:25 augustss Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -597,6 +597,7 @@ ohci_alloc_sitd(ohci_softc_t *sc) OHCI_ITD_ALIGN, &dma); if (err) return (NULL); + s = splusb(); for(i = 0; i < OHCI_SITD_CHUNK; i++) { offs = i * OHCI_SITD_SIZE; sitd = KERNADDR(&dma, offs); @@ -604,6 +605,7 @@ ohci_alloc_sitd(ohci_softc_t *sc) sitd->nextitd = sc->sc_freeitds; sc->sc_freeitds = sitd; } + splx(s); } s = splusb(); @@ -1201,8 +1203,11 @@ void ohci_rhsc_enable(void *v_sc) { ohci_softc_t *sc = v_sc; + int s; + s = splhardusb(); ohci_rhsc_able(sc, 1); + splx(s); } #ifdef OHCI_DEBUG |
