Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic In spc_intr(), return 0 if the interrupt is not f...



details:   https://anonhg.NetBSD.org/src/rev/5010ebf47fa8
branches:  trunk
changeset: 570125:5010ebf47fa8
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Sat Sep 25 10:32:15 2004 +0000

description:
In spc_intr(), return 0 if the interrupt is not for spc(4).

diffstat:

 sys/dev/ic/mb89352.c |  16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diffs (43 lines):

diff -r 483045cc31f0 -r 5010ebf47fa8 sys/dev/ic/mb89352.c
--- a/sys/dev/ic/mb89352.c      Sat Sep 25 10:15:36 2004 +0000
+++ b/sys/dev/ic/mb89352.c      Sat Sep 25 10:32:15 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mb89352.c,v 1.33 2004/09/25 10:15:36 tsutsui Exp $     */
+/*     $NetBSD: mb89352.c,v 1.34 2004/09/25 10:32:15 tsutsui Exp $     */
 /*     NecBSD: mb89352.c,v 1.4 1998/03/14 07:31:20 kmatsuda Exp        */
 
 /*-
@@ -70,7 +70,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mb89352.c,v 1.33 2004/09/25 10:15:36 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mb89352.c,v 1.34 2004/09/25 10:32:15 tsutsui Exp $");
 
 #ifdef DDB
 #define        integrate
@@ -1674,18 +1674,18 @@
        struct spc_tinfo *ti;
        int n;
 
+       SPC_TRACE(("spc_intr  "));
+
+       ints = bus_space_read_1(iot, ioh, INTS);
+       if (ints == 0)
+               return 0;
+
        /*
         * Disable interrupt.
         */
        bus_space_write_1(iot, ioh, SCTL,
            bus_space_read_1(iot, ioh, SCTL) & ~SCTL_INTR_ENAB);
 
-       SPC_TRACE(("spc_intr  "));
-
-       ints = bus_space_read_1(iot, ioh, INTS);
-       if (ints == 0)
-               goto out;
-
        if (sc->sc_dma_done != NULL &&
            sc->sc_state == SPC_CONNECTED &&
            (sc->sc_flags & SPC_DOINGDMA) != 0 &&



Home | Main Index | Thread Index | Old Index