From 4996c6df5e2556471c44ab27ca1f295345c7865a Mon Sep 17 00:00:00 2001 From: Michael Shalayeff Date: Wed, 14 Mar 2001 08:09:52 +0000 Subject: count interrupts proper; pointed out and tested by form@ --- sys/dev/pci/auvia.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sys/dev/pci/auvia.c b/sys/dev/pci/auvia.c index 83e1f640507..555862b8d95 100644 --- a/sys/dev/pci/auvia.c +++ b/sys/dev/pci/auvia.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auvia.c,v 1.3 2000/12/27 02:50:07 mickey Exp $ */ +/* $OpenBSD: auvia.c,v 1.4 2001/03/14 08:09:51 mickey Exp $ */ /* $NetBSD: auvia.c,v 1.7 2000/11/15 21:06:33 jdolecek Exp $ */ /*- @@ -957,6 +957,7 @@ auvia_intr(void *arg) { struct auvia_softc *sc = arg; u_int8_t r; + int i = 0; r = bus_space_read_1(sc->sc_iot, sc->sc_ioh, AUVIA_RECORD_STAT); if (r & AUVIA_RPSTAT_INTR) { @@ -966,6 +967,8 @@ auvia_intr(void *arg) /* clear interrupts */ bus_space_write_1(sc->sc_iot, sc->sc_ioh, AUVIA_RECORD_STAT, AUVIA_RPSTAT_INTR); + + i++; } r = bus_space_read_1(sc->sc_iot, sc->sc_ioh, AUVIA_PLAY_STAT); if (r & AUVIA_RPSTAT_INTR) { @@ -975,7 +978,9 @@ auvia_intr(void *arg) /* clear interrupts */ bus_space_write_1(sc->sc_iot, sc->sc_ioh, AUVIA_PLAY_STAT, AUVIA_RPSTAT_INTR); + + i++; } - return 1; + return (i? 1 : 0); } -- cgit v1.2.3