diff options
author | Paul Irofti <pirofti@cvs.openbsd.org> | 2014-07-12 14:37:18 +0000 |
---|---|---|
committer | Paul Irofti <pirofti@cvs.openbsd.org> | 2014-07-12 14:37:18 +0000 |
commit | 254effd645eabb9e1a27a50e4708e2b01b1478ce (patch) | |
tree | 6577a74f54689b814c57fbeff691cc53b21d5c0f /sys | |
parent | 71b9f122458826a87fba1b2e6f94edd1ba7b8a7d (diff) |
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.
Diffstat (limited to 'sys')
-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 |