From owner-freebsd-acpi@FreeBSD.ORG Sat Dec 11 19:58:03 2004 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 94C9C16A4CE for ; Sat, 11 Dec 2004 19:58:03 +0000 (GMT) Received: from ylpvm01.prodigy.net (ylpvm01-ext.prodigy.net [207.115.57.32]) by mx1.FreeBSD.org (Postfix) with ESMTP id 30A0D43D2D for ; Sat, 11 Dec 2004 19:58:03 +0000 (GMT) (envelope-from nate@root.org) Received: from [10.0.5.50] (adsl-64-171-186-123.dsl.snfc21.pacbell.net [64.171.186.123])iBBJvxo1014116; Sat, 11 Dec 2004 14:57:59 -0500 Message-ID: <41BB5146.1080102@root.org> Date: Sat, 11 Dec 2004 11:57:58 -0800 From: Nate Lawson User-Agent: Mozilla Thunderbird 1.0RC1 (X11/20041205) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ulrich Spoerlein References: <41B4E577.9060502@root.org> <41B50754.10604@centtech.com> <41B50C12.6070103@root.org> <20041208095845.GA896@galgenberg.net> <41B76AF2.3040204@root.org> <20041210180446.GA768@galgenberg.net> <41B9EE4E.8030703@root.org> <20041210205417.GB768@galgenberg.net> In-Reply-To: <20041210205417.GB768@galgenberg.net> Content-Type: multipart/mixed; boundary="------------040503080904080909030402" cc: acpi@FreeBSD.org Subject: Re: suspend/resume improved? X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Dec 2004 19:58:03 -0000 This is a multi-part message in MIME format. --------------040503080904080909030402 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Ulrich Spoerlein wrote: > On Fri, 10.12.2004 at 10:43:26 -0800, Nate Lawson wrote: > >>>Line 444 is the culprit: >>> ACPI_FLUSH_CPU_CACHE (); >>> >>> Status = AcpiHwRegisterWrite (ACPI_MTX_DO_NOT_LOCK, >>> ACPI_REGISTER_PM1A_CONTROL, PM1AControl); >>> if (ACPI_FAILURE (Status)) >>> { >>> return_ACPI_STATUS (Status); >>> } >>> >>>Putting the loop before AcpiHwRegisterWrite will enter infinite loop, >>>putting it after it -> Reset >> >>Interesting. If you add a "DELAY(10000);" before the register write, >>does this help? A more likely issue is that we need to write pm1a/b at >>the same time. Let me think about this and get you more info later. > > > It "looks" like the delay does nothing, however I noticed that all three > LEDs (num/scroll/caps lock) were lighting up for 1-2s. > > I then swapped pm1a and pm1b, but nothing changed. That's not quite what I meant. The acpi-ca code splits the write of SLP_TYP and SLP_EN into two separate writes. I suspect some BIOSes don't like this. Try the attached patch that combines them. -- Nate --------------040503080904080909030402 Content-Type: text/plain; name="sleep_split.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="sleep_split.diff" Index: sys/contrib/dev/acpica/hwsleep.c =================================================================== RCS file: /home/ncvs/src/sys/contrib/dev/acpica/hwsleep.c,v retrieving revision 1.18 diff -u -r1.18 hwsleep.c --- sys/contrib/dev/acpica/hwsleep.c 1 Dec 2004 23:40:48 -0000 1.18 +++ sys/contrib/dev/acpica/hwsleep.c 11 Dec 2004 02:23:18 -0000 @@ -420,6 +420,7 @@ /* Write #1: fill in SLP_TYP data */ +#if 0 Status = AcpiHwRegisterWrite (ACPI_MTX_DO_NOT_LOCK, ACPI_REGISTER_PM1A_CONTROL, PM1AControl); if (ACPI_FAILURE (Status)) { @@ -431,6 +432,7 @@ { return_ACPI_STATUS (Status); } +#endif /* Insert SLP_ENABLE bit */ --------------040503080904080909030402--