From owner-freebsd-acpi@FreeBSD.ORG Sat Apr 12 17:06:36 2008 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E5F501065670 for ; Sat, 12 Apr 2008 17:06:36 +0000 (UTC) (envelope-from mickey242@gmx.net) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id 3360B8FC26 for ; Sat, 12 Apr 2008 17:06:35 +0000 (UTC) (envelope-from mickey242@gmx.net) Received: (qmail invoked by alias); 12 Apr 2008 17:06:34 -0000 Received: from port-ip-213-211-209-123.reverse.mdcc-fun.de (EHLO gunhead.enforcer.cc) [213.211.209.123] by mail.gmx.net (mp007) with SMTP; 12 Apr 2008 19:06:34 +0200 X-Authenticated: #8913523 X-Provags-ID: V01U2FsdGVkX1/A4QpnQS7AhdJ77tf2Lnck0D5kUH5Az1yhDyz0Ia iiw49466F4c7Li Message-ID: <4800EC15.5060206@gmx.net> Date: Sat, 12 Apr 2008 19:06:29 +0200 From: Andreas Wetzel User-Agent: Thunderbird 2.0.0.12 (X11/20080310) MIME-Version: 1.0 To: Mitsuru IWASAKI References: <47F8B038.7000400@gmx.net> <20080409.214318.132031270.iwasaki@jp.FreeBSD.org> In-Reply-To: <20080409.214318.132031270.iwasaki@jp.FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 Cc: freebsd-acpi@freebsd.org Subject: Re: FreeBSD 7.0 suspend X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Apr 2008 17:06:37 -0000 Mitsuru IWASAKI wrote: > >> /* 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) > } > > /** > Yes! With a semicolon added, the patch seems to work fine. -- Keep it icy man. I don't want to end up a corpse before my time because you were daydreaming.