CVS commit: [netbsd-10] src/sys/arch/mac68k/dev

2024-05-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat May 11 14:46:26 UTC 2024

Modified Files:
src/sys/arch/mac68k/dev [netbsd-10]: pm_direct.c

Log Message:
Pull up following revision(s) (requested by nat in ticket #686):

sys/arch/mac68k/dev/pm_direct.c: revision 1.31

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).


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.30.4.1 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.30.4.1
--- 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	Sat May 11 14:46:26 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.30.4.1 2024/05/11 14:46:26 martin Exp $	*/
 
 /*
  * Copyright (C) 1997 Takashi Hamada
@@ -32,7 +32,7 @@
 /* From: pm_direct.c 1.3 03/18/98 Takashi Hamada */
 
 #include 
-__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.30.4.1 2024/05/11 14:46:26 martin 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)) {



CVS commit: [netbsd-10] src/sys/arch/mac68k/dev

2024-05-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat May 11 14:46:26 UTC 2024

Modified Files:
src/sys/arch/mac68k/dev [netbsd-10]: pm_direct.c

Log Message:
Pull up following revision(s) (requested by nat in ticket #686):

sys/arch/mac68k/dev/pm_direct.c: revision 1.31

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).


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.30.4.1 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.