From 15c42ae520ca6d2b5594a65f8614e67df17af394 Mon Sep 17 00:00:00 2001 From: miod Date: Mon, 26 Dec 2022 19:17:00 +0000 Subject: [PATCH] send_adb_cuda() would assume the returned value of splhigh() is the macintr interrupt enable register; this used to be true more than 20 years ago but the interrupt code has changed a lot since, and it is nevertheless bad practice from md drivers to know to much about spl*() return values. The check should become a "spl >= IPL_TTY", but management of the adb_polling variable is good enough to need this at all. --- sys/arch/macppc/dev/adb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/arch/macppc/dev/adb.c b/sys/arch/macppc/dev/adb.c index 8a351cdc829..b94c0285c1e 100644 --- a/sys/arch/macppc/dev/adb.c +++ b/sys/arch/macppc/dev/adb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: adb.c,v 1.48 2022/10/23 03:43:03 gkoehler Exp $ */ +/* $OpenBSD: adb.c,v 1.49 2022/12/26 19:17:00 miod Exp $ */ /* $NetBSD: adb.c,v 1.6 1999/08/16 06:28:09 tsubai Exp $ */ /* $NetBSD: adb_direct.c,v 1.14 2000/06/08 22:10:45 tsubai Exp $ */ @@ -612,7 +612,7 @@ send_adb_cuda(u_char * in, u_char * buffer, void *compRout, void *data, splx(s); - if ((s & (1 << 18)) || adb_polling) /* XXX were VIA1 interrupts blocked ? */ + if (adb_polling) /* XXX were VIA1 interrupts blocked ? */ /* poll until byte done */ while ((adbActionState != ADB_ACTION_IDLE) || (ADB_INTR_IS_ON) || (adbWaiting == 1)) -- 2.20.1