summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2007-03-04 15:35:10 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2007-03-04 15:35:10 +0000
commitac205014bba9f42ca2861c56eb1c866c40d120ad (patch)
tree28ab540610ed4b0258620111ebc70974e596a2fe
parent6a1b3e5dab2a0b2eba6cdbf0def4ab6f35e3222c (diff)
Limit knowledge of splfoo() return values, and use mac68k_machine.via1_ipl
instead of hardcoded 1; this gets us rid of unnecessary polls on machines running with A/UX interrupts.
-rw-r--r--sys/arch/mac68k/dev/adb.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/sys/arch/mac68k/dev/adb.c b/sys/arch/mac68k/dev/adb.c
index 717a12055bb..815d348190b 100644
--- a/sys/arch/mac68k/dev/adb.c
+++ b/sys/arch/mac68k/dev/adb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: adb.c,v 1.23 2006/04/14 09:36:49 martin Exp $ */
+/* $OpenBSD: adb.c,v 1.24 2007/03/04 15:35:09 miod Exp $ */
/* $NetBSD: adb.c,v 1.47 2005/06/16 22:43:36 jmc Exp $ */
/* $NetBSD: adb_direct.c,v 1.51 2005/06/16 22:43:36 jmc Exp $ */
@@ -689,7 +689,8 @@ send_adb_cuda(u_char *in, u_char *buffer, void *compRout, void *data, int
splx(s);
- if (0x0100 <= (s & 0x0700)) /* were VIA1 interrupts blocked? */
+ /* were VIA1 interrupts blocked? */
+ if (PSLTOIPL(s) >= mac68k_machine.via1_ipl) {
/* poll until byte done */
while ((adbActionState != ADB_ACTION_IDLE) || (ADB_INTR_IS_ON)
|| (adbWaiting == 1))
@@ -698,6 +699,7 @@ send_adb_cuda(u_char *in, u_char *buffer, void *compRout, void *data, int
if (adb_polling)
adb_soft_intr();
}
+ }
return 0;
} /* send_adb_cuda */
@@ -1130,7 +1132,8 @@ send_adb_II(u_char *in, u_char *buffer, void *compRout, void *data, int command)
splx(s);
- if (0x0100 <= (s & 0x0700)) /* were VIA1 interrupts blocked? */
+ /* were VIA1 interrupts blocked? */
+ if (PSLTOIPL(s) >= mac68k_machine.via1_ipl) {
/* poll until message done */
while ((adbActionState != ADB_ACTION_IDLE) || (ADB_INTR_IS_ON)
|| (adbWaiting == 1))
@@ -1139,6 +1142,7 @@ send_adb_II(u_char *in, u_char *buffer, void *compRout, void *data, int command)
if (adb_polling)
adb_soft_intr();
}
+ }
return 0;
}
@@ -1501,7 +1505,8 @@ send_adb_IIsi(u_char *in, u_char *buffer, void *compRout, void *data, int
splx(s);
- if (0x0100 <= (s & 0x0700)) /* were VIA1 interrupts blocked? */
+ /* were VIA1 interrupts blocked? */
+ if (PSLTOIPL(s) >= mac68k_machine.via1_ipl) {
/* poll until byte done */
while ((adbActionState != ADB_ACTION_IDLE) || (ADB_INTR_IS_ON)
|| (adbWaiting == 1))
@@ -1510,6 +1515,7 @@ send_adb_IIsi(u_char *in, u_char *buffer, void *compRout, void *data, int
if (adb_polling)
adb_soft_intr();
}
+ }
return 0;
} /* send_adb_IIsi */