diff options
author | joe <joe@FreeBSD.org> | 2002-04-07 09:52:49 +0000 |
---|---|---|
committer | joe <joe@FreeBSD.org> | 2002-04-07 09:52:49 +0000 |
commit | 017a3a7612bfda2c2c61f574fa70be24a7a0d07f (patch) | |
tree | f4fa8e8802f911814e800479e1307a166791b651 /sys/dev | |
parent | 3b6f1fdecb93b2c8c1e148782a0f7b9e638b6c2b (diff) | |
download | FreeBSD-src-017a3a7612bfda2c2c61f574fa70be24a7a0d07f.zip FreeBSD-src-017a3a7612bfda2c2c61f574fa70be24a7a0d07f.tar.gz |
MFNetBSD:
revision 1.141
date: 2001/10/24 21:04:04; author: augustss; Exp; lines: +20 -4
Some more paranoia tests when entering the interrupt routine.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/usb/uhci.c | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/sys/dev/usb/uhci.c b/sys/dev/usb/uhci.c index 39bb04b..978a764 100644 --- a/sys/dev/usb/uhci.c +++ b/sys/dev/usb/uhci.c @@ -1,4 +1,4 @@ -/* $NetBSD: uhci.c,v 1.140 2001/10/24 20:20:03 augustss Exp $ */ +/* $NetBSD: uhci.c,v 1.141 2001/10/24 21:04:04 augustss Exp $ */ /* $FreeBSD$ */ /* @@ -1143,10 +1143,27 @@ uhci_remove_bulk(uhci_softc_t *sc, uhci_soft_qh_t *sqh) sc->sc_bulk_end = pqh; } +Static int uhci_intr1(uhci_softc_t *); + int uhci_intr(void *arg) { uhci_softc_t *sc = arg; + + DPRINTFN(15,("uhci_intr: real interrupt\n")); + if (sc->sc_bus.use_polling) { +#ifdef DIAGNOSTIC + printf("uhci_intr: ignored interrupt while polling\n"); +#endif + return (0); + } + return (uhci_intr1(sc)); +} + +int +uhci_intr1(uhci_softc_t *sc) +{ + int status; int ack; @@ -1168,7 +1185,7 @@ uhci_intr(void *arg) #ifdef UHCI_DEBUG if (uhcidebug > 15) { - DPRINTF(("%s: uhci_intr\n", USBDEVNAME(sc->sc_bus.bdev))); + DPRINTF(("%s: uhci_intr1\n", USBDEVNAME(sc->sc_bus.bdev))); uhci_dumpregs(sc); } #endif @@ -1476,7 +1493,7 @@ uhci_waitintr(uhci_softc_t *sc, usbd_xfer_handle xfer) usb_delay_ms(&sc->sc_bus, 1); DPRINTFN(20,("uhci_waitintr: 0x%04x\n", UREAD2(sc, UHCI_STS))); if (UREAD2(sc, UHCI_STS) & UHCI_STS_USBINT) { - uhci_intr(sc); + uhci_intr1(sc); if (xfer->status != USBD_IN_PROGRESS) return; } @@ -1501,7 +1518,7 @@ uhci_poll(struct usbd_bus *bus) uhci_softc_t *sc = (uhci_softc_t *)bus; if (UREAD2(sc, UHCI_STS) & UHCI_STS_USBINT) - uhci_intr(sc); + uhci_intr1(sc); } #if 0 |