Module Name: src Committed By: nat Date: Fri Apr 26 00:59:08 UTC 2024
Modified Files: src/sys/arch/mac68k/dev: pm_direct.c Log Message: Return early if PM data is not available. This avoids random crashes on my Powerbook when using the mouse or keyboard. The same was needed for the Powerbook 5xx/Duos (compile tested only). XXX pullup-10, pullup-9, pullup-8. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/arch/mac68k/dev/pm_direct.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/mac68k/dev/pm_direct.c diff -u src/sys/arch/mac68k/dev/pm_direct.c:1.30 src/sys/arch/mac68k/dev/pm_direct.c:1.31 --- src/sys/arch/mac68k/dev/pm_direct.c:1.30 Sat Aug 21 11:55:24 2021 +++ src/sys/arch/mac68k/dev/pm_direct.c Fri Apr 26 00:59:08 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: pm_direct.c,v 1.30 2021/08/21 11:55:24 andvar Exp $ */ +/* $NetBSD: pm_direct.c,v 1.31 2024/04/26 00:59:08 nat Exp $ */ /* * Copyright (C) 1997 Takashi Hamada @@ -32,7 +32,7 @@ /* From: pm_direct.c 1.3 03/18/98 Takashi Hamada */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pm_direct.c,v 1.30 2021/08/21 11:55:24 andvar Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pm_direct.c,v 1.31 2024/04/26 00:59:08 nat Exp $"); #include "opt_adb.h" @@ -562,6 +562,7 @@ pm_intr_pm1(void *arg) printf("pm: PM is not ready. error code=%08x\n", rval); #endif splx(s); + return; } if ((pmdata.data[2] & 0x10) == 0x10) { @@ -821,6 +822,7 @@ pm_intr_pm2(void *arg) printf("pm: PM is not ready. error code: %08x\n", rval); #endif splx(s); + return; } switch ((u_int)(pmdata.data[2] & 0xff)) {