Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci Return 0 when no interrupt was handled.



details:   https://anonhg.NetBSD.org/src/rev/c5a10376ace0
branches:  trunk
changeset: 524930:c5a10376ace0
user:      fvdl <fvdl%NetBSD.org@localhost>
date:      Tue Apr 02 16:02:38 2002 +0000

description:
Return 0 when no interrupt was handled.

diffstat:

 sys/dev/pci/auvia.c |  11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diffs (46 lines):

diff -r e8b9cd2524d1 -r c5a10376ace0 sys/dev/pci/auvia.c
--- a/sys/dev/pci/auvia.c       Tue Apr 02 15:22:37 2002 +0000
+++ b/sys/dev/pci/auvia.c       Tue Apr 02 16:02:38 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: auvia.c,v 1.16 2002/03/16 21:45:49 jmcneill Exp $      */
+/*     $NetBSD: auvia.c,v 1.17 2002/04/02 16:02:38 fvdl Exp $  */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -47,7 +47,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: auvia.c,v 1.16 2002/03/16 21:45:49 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: auvia.c,v 1.17 2002/04/02 16:02:38 fvdl Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -950,6 +950,9 @@
 {
        struct auvia_softc *sc = arg;
        u_int8_t r;
+       int rval;
+
+       rval = 0;
 
        r = bus_space_read_1(sc->sc_iot, sc->sc_ioh, AUVIA_RECORD_STAT);
        if (r & AUVIA_RPSTAT_INTR) {
@@ -959,6 +962,7 @@
                /* clear interrupts */
                bus_space_write_1(sc->sc_iot, sc->sc_ioh, AUVIA_RECORD_STAT,
                        AUVIA_RPSTAT_INTR);
+               rval = 1;
        }
        r = bus_space_read_1(sc->sc_iot, sc->sc_ioh, AUVIA_PLAY_STAT);
        if (r & AUVIA_RPSTAT_INTR) {
@@ -968,7 +972,8 @@
                /* clear interrupts */
                bus_space_write_1(sc->sc_iot, sc->sc_ioh, AUVIA_PLAY_STAT,
                        AUVIA_RPSTAT_INTR);
+               rval = 1;
        }
 
-       return 1;
+       return rval;
 }



Home | Main Index | Thread Index | Old Index