summaryrefslogtreecommitdiff
path: root/sys/arch/mvme88k/dev
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2004-07-31 22:26:28 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2004-07-31 22:26:28 +0000
commit1c1b00acf055c1402e3d19a43a3f5a5e5071d140 (patch)
treea96450214f621c18cac66b347081be8a4b6cb7fd /sys/arch/mvme88k/dev
parente7a09c9c2e0ccdc9baf2093124669436f7c7f725 (diff)
Always claim dart interrupts, even if they report disabled conditions, but
warn about them on console. More informative than ``regular'' spurious interrupt warnings.
Diffstat (limited to 'sys/arch/mvme88k/dev')
-rw-r--r--sys/arch/mvme88k/dev/dart.c24
1 files changed, 17 insertions, 7 deletions
diff --git a/sys/arch/mvme88k/dev/dart.c b/sys/arch/mvme88k/dev/dart.c
index 48e28be4448..09bcbfaf59b 100644
--- a/sys/arch/mvme88k/dev/dart.c
+++ b/sys/arch/mvme88k/dev/dart.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dart.c,v 1.37 2004/07/30 19:02:05 miod Exp $ */
+/* $OpenBSD: dart.c,v 1.38 2004/07/31 22:26:27 miod Exp $ */
/*
* Mach Operating System
@@ -1086,18 +1086,28 @@ dartintr(arg)
{
struct dartsoftc *sc = arg;
- unsigned char isr;
+ unsigned char isr, imr;
int port;
union dartreg *addr;
/* read interrupt status register and mask with imr */
addr = sc->dart_reg;
-
isr = addr->read.rd_isr;
- isr &= dart_sv_reg.sv_imr;
-
- if (isr == 0) /* not interrupt from this duart */
- return 0;
+ imr = dart_sv_reg.sv_imr;
+
+ if ((isr & imr) == 0) {
+ /*
+ * We got an interrupt on a disabled condition (such as TX
+ * ready change on a disabled port). This should not happen,
+ * but we have to claim the interrupt anyway.
+ */
+#ifdef DIAGNOSTIC
+ printf("dartintr: spurious interrupt, isr %x imr %x\n",
+ isr, imr);
+#endif
+ return 1;
+ }
+ isr &= imr;
if (isr & IIPCHG) {
unsigned int ip = addr->read.rd_ip;