From owner-acpi-jp@jp.freebsd.org  Sun Nov  4 22:25:22 2001
Received: (from daemon@localhost)
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) id WAA53580;
	Sun, 4 Nov 2001 22:25:22 +0900 (JST)
	(envelope-from owner-acpi-jp@jp.FreeBSD.org)
Received: from taxismtp1.alchemyfx.com (taxismtp1.alchemy.net [209.132.220.151])
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) with ESMTP id WAA53573
	for <acpi-jp@jp.FreeBSD.org>; Sun, 4 Nov 2001 22:25:21 +0900 (JST)
	(envelope-from neckpain@nettaxi.com)
From: neckpain@nettaxi.com
Received: from localhost (P061198168081.ppp.prin.ne.jp [61.198.168.81])
	by taxismtp1.alchemyfx.com (8.9.3/8.9.3) with ESMTP id FAA26877;
	Sun, 4 Nov 2001 05:24:44 -0800
Message-Id: <200111041324.FAA26877@taxismtp1.alchemyfx.com>
Date: Sun, 4 Nov 2001 22:23:58 +0900
To: acpi-jp@jp.FreeBSD.org
Cc: neckpain@nettaxi.com
References: <20011103.215652.130242360.iwasaki@jp.FreeBSD.org>
 <200111031825.KAA16780@taxismtp2.alchemyfx.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <200111031825.KAA16780@taxismtp2.alchemyfx.com>
User-Agent: Mutt/1.3.22.1i-ja0
X-Dispatcher: imput version 20000228(IM140)
Lines: 24
Reply-To: acpi-jp@jp.freebsd.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+010328
X-Sequence: acpi-jp 1433
Subject: [acpi-jp 1433] Re: Fw: hwsleep.c, r1.1.1.9 killed resume from S1 state
Errors-To: owner-acpi-jp@jp.freebsd.org
Sender: owner-acpi-jp@jp.freebsd.org
X-Originator: neckpain@nettaxi.com

On Sun, Nov 04, 2001 at 03:16:29AM +0900, I wrote:
> I found that something is missing at the end of AcpiHwEnableGpe()
> (compare with AcpiHwDisableGpe()), but I'm still not confident as
> other people don't seem to be affected by this.

This is obviously a bug: according to the comments in hwgpe.c,
the GPEs enabled or disabled via AcpiHw{En,Dis}ablGpe() should be
kept track so that those GPEs won't be set to otherwise when going to sleep.
AcpiHwDisableGpeForWakeup() at the end of AcpiHwDisableGpe() is there
for this purpose. Same goes for AcpiHwEnableGpes().

Since AcpiGbl_GpeRegisters[] were first initialized to all zero,
and no enabled GPEs had been kept track because of missing
call to AcpiHwEnableGpeForWakeup(), all GPEs were disabled
in AcpiHwDisableNonWakeupGpes(). This is why my VAIO could not
resume from the sleep state.

> Anyway, with the attached patch, I can resume from S1 state now.

Actually, with ACPI CA 20011018 my VAIO able to do S3 sleep multiple times
now! Bad thing is that it panics when resuming from a sleep state after
resuming from another sleep state. The panic itself occurs in free() called
from ATA code. This is easily reproducible on my machine, so I can send the
back trace to whomever interested.
