From f2c3050d29dfe5e28caf68c5a9c5119a03487991 Mon Sep 17 00:00:00 2001 From: onoe Date: Thu, 12 Oct 2000 03:13:47 +0000 Subject: [PATCH] change the type of the apbus interrupt handler from void to int for each driver to indicate the interrupt has been handled or not. --- sys/arch/newsmips/apbus/if_sn.c | 8 +++++--- sys/arch/newsmips/apbus/zs_ap.c | 7 ++++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/sys/arch/newsmips/apbus/if_sn.c b/sys/arch/newsmips/apbus/if_sn.c index f7eb0d333304..9403cb59b843 100644 --- a/sys/arch/newsmips/apbus/if_sn.c +++ b/sys/arch/newsmips/apbus/if_sn.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_sn.c,v 1.5 2000/10/01 23:32:41 thorpej Exp $ */ +/* $NetBSD: if_sn.c,v 1.6 2000/10/12 03:13:47 onoe Exp $ */ /* * National Semiconductor DP8393X SONIC Driver @@ -845,16 +845,18 @@ initialise_rra(sc) wbflush(); } -void +int snintr(arg) void *arg; { struct sn_softc *sc = (struct sn_softc *)arg; + int handled = 0; int isr; while ((isr = (NIC_GET(sc, SNR_ISR) & ISR_ALL)) != 0) { /* scrub the interrupts that we are going to service */ NIC_PUT(sc, SNR_ISR, isr); + handled = 1; wbflush(); if (isr & (ISR_BR | ISR_LCD | ISR_TC)) @@ -903,7 +905,7 @@ snintr(arg) } snstart(&sc->sc_if); } - return; + return handled; } /* diff --git a/sys/arch/newsmips/apbus/zs_ap.c b/sys/arch/newsmips/apbus/zs_ap.c index 73d607472b14..b1c5bff79348 100644 --- a/sys/arch/newsmips/apbus/zs_ap.c +++ b/sys/arch/newsmips/apbus/zs_ap.c @@ -1,4 +1,4 @@ -/* $NetBSD: zs_ap.c,v 1.4 2000/03/06 21:36:10 thorpej Exp $ */ +/* $NetBSD: zs_ap.c,v 1.5 2000/10/12 03:13:47 onoe Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -138,7 +138,7 @@ static u_char zs_init_reg[16] = { static struct zschan * zs_get_chan_addr __P((int, int)); static void zs_ap_delay __P((void)); -static void zshard_ap __P((void *)); +static int zshard_ap __P((void *)); static int zs_getc __P((void *)); static void zs_putc __P((void *, int)); int zshard __P((void *)); @@ -351,11 +351,12 @@ zs_ap_attach(parent, self, aux) * Our ZS chips all share a common, autovectored interrupt, * so we have to look at all of them on each interrupt. */ -static void +static int zshard_ap(arg) void *arg; { zshard(arg); + return 1; } /*