summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2001-03-14 08:09:52 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2001-03-14 08:09:52 +0000
commit4996c6df5e2556471c44ab27ca1f295345c7865a (patch)
treee6943bef8930cd927fcb4c86cb6befd6f7ede913
parent1b02ad742026c364f306e51bf6c0569a1eb9aa20 (diff)
count interrupts proper; pointed out and tested by form@
-rw-r--r--sys/dev/pci/auvia.c9
1 files 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);
}