FreeBSD 7.0 suspend

Mitsuru IWASAKI iwasaki at jp.FreeBSD.org
Wed Apr 9 12:43:24 UTC 2008


Hi,

From: Andreas Wetzel <mickey242 at gmx.net>
Subject: FreeBSD 7.0 suspend
Date: Sun, 06 Apr 2008 13:12:56 +0200
Message-ID: <47F8B038.7000400 at gmx.net>

>      /* If devd(8) is not running, immediately enter the sleep state. */
>      if (devctl_process_running() == FALSE) {
>      ...
> 
> For some reason this check returns FALSE, although devd is actually running.
> When i comment out the check, everything works as expected: devd is notified,
> executes /etc/rc.suspend, which in turn calls acpiconf -k 0 when done, and
> then the system goes to sleep.
> 
> Any ideas, why this function does not correctly recognize that devd is
> running?

Please try the following patches and see if the problem is solved.
Thanks!

Index: subr_bus.c
===================================================================
RCS file: /home/ncvs/src/sys/kern/subr_bus.c,v
retrieving revision 1.201.2.1
diff -u -r1.201.2.1 subr_bus.c
--- subr_bus.c	6 Feb 2008 01:34:18 -0000	1.201.2.1
+++ subr_bus.c	9 Apr 2008 12:30:30 -0000
@@ -504,7 +504,7 @@
 boolean_t
 devctl_process_running(void)
 {
-	return (devsoftc.async_proc != NULL);
+	return (devsoftc.inuse == 1)
 }
 
 /**


More information about the freebsd-acpi mailing list