Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci emuxki_intr(): return 1 if interrupt was for us, ...



details:   https://anonhg.NetBSD.org/src/rev/90b87032a3e3
branches:  trunk
changeset: 540783:90b87032a3e3
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Tue Dec 24 10:53:03 2002 +0000

description:
emuxki_intr(): return 1 if interrupt was for us, 0 if not
this appear to fix occassional sample repeats on my dual CPU i386

diffstat:

 sys/dev/pci/emuxki.c |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (39 lines):

diff -r c249d8cbb117 -r 90b87032a3e3 sys/dev/pci/emuxki.c
--- a/sys/dev/pci/emuxki.c      Tue Dec 24 08:12:15 2002 +0000
+++ b/sys/dev/pci/emuxki.c      Tue Dec 24 10:53:03 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: emuxki.c,v 1.12 2002/10/02 16:51:11 thorpej Exp $      */
+/*     $NetBSD: emuxki.c,v 1.13 2002/12/24 10:53:03 jdolecek Exp $     */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: emuxki.c,v 1.12 2002/10/02 16:51:11 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: emuxki.c,v 1.13 2002/12/24 10:53:03 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -1519,6 +1519,7 @@
        struct emuxki_softc *sc = arg;
        u_int32_t       ipr, curblk;
        struct emuxki_voice *voice;
+       int claim = 0;
 
        while ((ipr = bus_space_read_4(sc->sc_iot, sc->sc_ioh, EMU_IPR))) {
                if (ipr & EMU_IPR_INTERVALTIMER) {
@@ -1540,9 +1541,11 @@
 
                /* Got interrupt */
                bus_space_write_4(sc->sc_iot, sc->sc_ioh, EMU_IPR, ipr);
+
+               claim = 1;
        }
 
-       return (0);
+       return (claim);
 }
 
 



Home | Main Index | Thread Index | Old Index