From: pirofti Date: Sat, 12 Jul 2014 14:37:17 +0000 (+0000) Subject: I don't need to treat the (half-)empty Tx and Rx FIFO cases. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=e19b21acd007030d0c6cf289f56e6e84842acf0c;p=openbsd 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. --- 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 @@ -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