diff options
| author | 2007-03-04 15:35:09 +0000 | |
|---|---|---|
| committer | 2007-03-04 15:35:09 +0000 | |
| commit | 0c412b01c5ecc0d3a4e5151b1ee91ebdfed536d8 (patch) | |
| tree | 8fe9ebb3ddfb1151d5f2deed1537726d72ab8fcc | |
| parent | Invoke adb_cuda_autopoll() and leave polling mode after all initialization (diff) | |
| download | wireguard-openbsd-0c412b01c5ecc0d3a4e5151b1ee91ebdfed536d8.tar.xz wireguard-openbsd-0c412b01c5ecc0d3a4e5151b1ee91ebdfed536d8.zip | |
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.c | 14 |
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 */ |
