Clear the ISDN TXPTR/RXPTR/OVRN interrupt bits here. Based on
a suggestion by Gregory McGarry.
This commit is contained in:
parent
faaa100d6e
commit
ea0cb4c30e
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ioasic.c,v 1.33 2000/07/11 04:10:25 nisimura Exp $ */
|
||||
/* $NetBSD: ioasic.c,v 1.34 2000/07/18 06:10:06 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -68,7 +68,7 @@
|
|||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: ioasic.c,v 1.33 2000/07/11 04:10:25 nisimura Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ioasic.c,v 1.34 2000/07/18 06:10:06 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/kernel.h>
|
||||
|
@ -305,29 +305,37 @@ ioasic_intr(val)
|
|||
register struct ioasic_softc *sc = val;
|
||||
register int ifound;
|
||||
int gifound;
|
||||
u_int32_t sir;
|
||||
u_int32_t sir, osir;
|
||||
|
||||
gifound = 0;
|
||||
do {
|
||||
ifound = 0;
|
||||
tc_syncbus();
|
||||
|
||||
sir = bus_space_read_4(sc->sc_bst, sc->sc_bsh, IOASIC_INTR);
|
||||
osir = sir =
|
||||
bus_space_read_4(sc->sc_bst, sc->sc_bsh, IOASIC_INTR);
|
||||
|
||||
#define INCRINTRCNT(slot) ioasicintrs[slot].iai_evcnt.ev_count++
|
||||
|
||||
/* XXX DUPLICATION OF INTERRUPT BIT INFORMATION... */
|
||||
#define CHECKINTR(slot, bits) \
|
||||
#define CHECKINTR(slot, bits, clear) \
|
||||
if (sir & (bits)) { \
|
||||
ifound = 1; \
|
||||
INCRINTRCNT(slot); \
|
||||
(*ioasicintrs[slot].iai_func) \
|
||||
(ioasicintrs[slot].iai_arg); \
|
||||
if (clear) \
|
||||
sir &= ~(bits); \
|
||||
}
|
||||
CHECKINTR(IOASIC_DEV_SCC0, IOASIC_INTR_SCC_0);
|
||||
CHECKINTR(IOASIC_DEV_SCC1, IOASIC_INTR_SCC_1);
|
||||
CHECKINTR(IOASIC_DEV_LANCE, IOASIC_INTR_LANCE);
|
||||
CHECKINTR(IOASIC_DEV_ISDN, IOASIC_INTR_ISDN_TXLOAD | IOASIC_INTR_ISDN_RXLOAD);
|
||||
CHECKINTR(IOASIC_DEV_SCC0, IOASIC_INTR_SCC_0, 0);
|
||||
CHECKINTR(IOASIC_DEV_SCC1, IOASIC_INTR_SCC_1, 0);
|
||||
CHECKINTR(IOASIC_DEV_LANCE, IOASIC_INTR_LANCE, 0);
|
||||
CHECKINTR(IOASIC_DEV_ISDN, IOASIC_INTR_ISDN_TXLOAD |
|
||||
IOASIC_INTR_ISDN_RXLOAD | IOASIC_INTR_ISDN_OVRUN, 1);
|
||||
|
||||
if (sir != osir)
|
||||
bus_space_write_4(sc->sc_bst, sc->sc_bsh,
|
||||
IOASIC_INTR, sir);
|
||||
|
||||
gifound |= ifound;
|
||||
} while (ifound);
|
||||
|
|
Loading…
Reference in New Issue