diff options
author | 2014-07-12 14:37:17 +0000 | |
---|---|---|
committer | 2014-07-12 14:37:17 +0000 | |
commit | e19b21acd007030d0c6cf289f56e6e84842acf0c (patch) | |
tree | 9ce494dd4d8504eec1b43f1dc240a4c27e3600d9 | |
parent | Move HTTP error codes into http.h. (diff) | |
download | wireguard-openbsd-e19b21acd007030d0c6cf289f56e6e84842acf0c.tar.xz wireguard-openbsd-e19b21acd007030d0c6cf289f56e6e84842acf0c.zip |
I don't need to treat the (half-)empty Tx and Rx FIFO cases.
Only the DMA-challenged host controllers need to, so don't panic!
While at it add some more debug messages when the interrupt returns 0.
-rw-r--r-- | sys/arch/octeon/dev/octhci.c | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/sys/arch/octeon/dev/octhci.c b/sys/arch/octeon/dev/octhci.c index 354164f6c72..c90833e5678 100644 --- a/sys/arch/octeon/dev/octhci.c +++ b/sys/arch/octeon/dev/octhci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: octhci.c,v 1.7 2014/07/12 14:31:20 pirofti Exp $ */ +/* $OpenBSD: octhci.c,v 1.8 2014/07/12 14:37:17 pirofti Exp $ */ /* * Copyright (c) 2014 Paul Irofti <pirofti@openbsd.org> @@ -370,30 +370,14 @@ octhci_intr1(struct octhci_softc *sc) intsts = octhci_regc_read(sc, USBC_GINTSTS_OFFSET); intmsk = octhci_regc_read(sc, USBC_GINTMSK_OFFSET); - if ((intsts & intmsk) == 0) + if ((intsts & intmsk) == 0) { + DPRINTFN(16, ("%s: masked interrupt\n", DEVNAME(sc))); return (0); + } sc->sc_bus.intr_context++; sc->sc_bus.no_intrs++; - if (intsts & USBC_GINTSTS_RXFLVL) { - /* Failed assumption: no DMA */ - printf("%s: Packets pending to be read from RxFIFO\n", - DEVNAME(sc)); - sc->sc_bus.dying = 1; - sc->sc_bus.intr_context--; - return (1); - } - if ((intsts & USBC_GINTSTS_PTXFEMP) || - (intsts & USBC_GINTSTS_NPTXFEMP)) { - /* Failed assumption: no DMA */ - printf("%s: Packets pending to be written on TxFIFO\n", - DEVNAME(sc)); - sc->sc_bus.dying = 1; - sc->sc_bus.intr_context--; - return (1); - } - octhci_regc_write(sc, USBC_GINTSTS_OFFSET, intsts); /* Acknowledge */ usb_schedsoftintr(&sc->sc_bus); #if 0 |