Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic Handle unexpected interrupts better.
details: https://anonhg.NetBSD.org/src/rev/94fd34defc00
branches: trunk
changeset: 525822:94fd34defc00
user: martin <martin%NetBSD.org@localhost>
date: Thu Apr 18 12:19:05 2002 +0000
description:
Handle unexpected interrupts better.
diffstat:
sys/dev/ic/isac.c | 7 ++++---
sys/dev/ic/isic.c | 17 ++++++-----------
2 files changed, 10 insertions(+), 14 deletions(-)
diffs (77 lines):
diff -r b8ce89ab3fea -r 94fd34defc00 sys/dev/ic/isac.c
--- a/sys/dev/ic/isac.c Thu Apr 18 12:13:07 2002 +0000
+++ b/sys/dev/ic/isac.c Thu Apr 18 12:19:05 2002 +0000
@@ -27,14 +27,14 @@
* i4b_isac.c - i4b siemens isdn chipset driver ISAC handler
* ---------------------------------------------------------
*
- * $Id: isac.c,v 1.14 2002/04/17 17:34:48 martin Exp $
+ * $Id: isac.c,v 1.15 2002/04/18 12:19:05 martin Exp $
*
* last edit-date: [Fri Jan 5 11:36:10 2001]
*
*---------------------------------------------------------------------------*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: isac.c,v 1.14 2002/04/17 17:34:48 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isac.c,v 1.15 2002/04/18 12:19:05 martin Exp $");
#ifdef __FreeBSD__
#include "opt_i4b.h"
@@ -102,7 +102,8 @@
if(ista & ISAC_ISTA_EXI) /* extended interrupt */
{
u_int8_t exirstat = ISAC_READ(I_EXIR);
- c |= isic_isac_exir_hdlr(sc, exirstat);
+ if (sc->sc_intr_valid == ISIC_INTR_VALID)
+ c |= isic_isac_exir_hdlr(sc, exirstat);
}
if(ista & ISAC_ISTA_RME) /* receive message end */
diff -r b8ce89ab3fea -r 94fd34defc00 sys/dev/ic/isic.c
--- a/sys/dev/ic/isic.c Thu Apr 18 12:13:07 2002 +0000
+++ b/sys/dev/ic/isic.c Thu Apr 18 12:19:05 2002 +0000
@@ -27,14 +27,14 @@
* i4b_isic.c - global isic stuff
* ==============================
*
- * $Id: isic.c,v 1.14 2002/04/08 12:20:49 martin Exp $
+ * $Id: isic.c,v 1.15 2002/04/18 12:19:06 martin Exp $
*
* last edit-date: [Fri Jan 5 11:36:10 2001]
*
*---------------------------------------------------------------------------*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: isic.c,v 1.14 2002/04/08 12:20:49 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isic.c,v 1.15 2002/04/18 12:19:06 martin Exp $");
#include <sys/param.h>
#include <sys/ioccom.h>
@@ -91,14 +91,8 @@
struct isic_softc *sc = arg;
/* could this be an interrupt for us? */
- if (sc->sc_intr_valid != ISIC_INTR_VALID) {
- /* just in case - clear it, or we might never get interrupted
- * again */
- if (sc->sc_intr_valid == ISIC_INTR_DISABLED &&
- sc->clearirq)
- sc->clearirq(sc);
- return 0;
- }
+ if (sc->sc_intr_valid == ISIC_INTR_DYING)
+ return 0; /* do not touch removed hardware */
if(sc->sc_ipac == 0) /* HSCX/ISAC interupt routine */
{
@@ -203,7 +197,8 @@
if(ipac_irq_stat & IPAC_ISTA_EXD)
{
/* force ISAC interrupt handling */
- isic_isac_irq(sc, ISAC_ISTA_EXI);
+ if (sc->sc_intr_valid == ISIC_INTR_VALID)
+ isic_isac_irq(sc, ISAC_ISTA_EXI);
was_ipac_irq = 1;
}
Home |
Main Index |
Thread Index |
Old Index