From owner-acpi-jp@jp.freebsd.org  Sun Nov  4 18:33:47 2001
Received: (from daemon@localhost)
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) id SAA42785;
	Sun, 4 Nov 2001 18:33:47 +0900 (JST)
	(envelope-from owner-acpi-jp@jp.FreeBSD.org)
Received: from thalia.fm.intel.com (fmfdns02.fm.intel.com [132.233.247.11])
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) with ESMTP id SAA42778
	for <acpi-jp@jp.freebsd.org>; Sun, 4 Nov 2001 18:33:45 +0900 (JST)
	(envelope-from andrew.grover@intel.com)
Received: from fmsmsxvs043.fm.intel.com (fmsmsxv043-1.fm.intel.com [132.233.48.128])
	by thalia.fm.intel.com (8.9.1a+p1/8.9.1/d: relay.m4,v 1.46 2001/10/25 21:02:55 root Exp $) with SMTP id JAA23638
	for <acpi-jp@jp.freebsd.org>; Sun, 4 Nov 2001 09:33:41 GMT
Received: from fmsmsx28.fm.intel.com ([132.233.42.28])
 by fmsmsxvs043.fm.intel.com (NAVGW 2.5.1.6) with SMTP id M2001110401325528540
 for <acpi-jp@jp.freebsd.org>; Sun, 04 Nov 2001 01:32:55 -0800
Received: by fmsmsx28.fm.intel.com with Internet Mail Service (5.5.2653.19)
	id <VDTKYGPZ>; Sun, 4 Nov 2001 01:34:01 -0800
Message-ID: <59885C5E3098D511AD690002A5072D3C42D6EA@orsmsx111.jf.intel.com>
From: "Grover, Andrew" <andrew.grover@intel.com>
To: "'acpi-jp@jp.freebsd.org'" <acpi-jp@jp.freebsd.org>
Date: Sun, 4 Nov 2001 01:33:39 -0800 
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2653.19)
Content-Type: text/plain;
	charset="iso-8859-1"
Reply-To: acpi-jp@jp.freebsd.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+010328
X-Sequence: acpi-jp 1431
Subject: [acpi-jp 1431] 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: andrew.grover@intel.com

GPEs enabled for wakeup are a subset of enabled GPEs.

That line in HwDisableGpe (and the lack of it in HwEnableGpe) is by design.
Without it, a GPE would carry across its "enabled for wakeup" status across
a disable/enable, which I thought was non-intuitive -- better to require
explicit rearm for wakeup. I probably should add a comment to the source.

Enabling a GPE should not always arm it for wakeup, which is why I added a
flag to AcpiEnableEvent to say "make this GPE wake-enabled". In hindsight I
can see how this change could break other code - the default went from all
GPEs being wake-enabled (since we weren't disabling non-wake GPEs like the
spec says we should) to all GPEs being *not* wake-enabled, unless they use
the new flag. Oops, sorry.

I think the appropriate use of ACPI_EVENT_WAKE_ENABLE in calls to
AcpiEnableEvent() is the proper solution.

Regards -- Andy

> -----Original Message-----
> From: neckpain@nettaxi.com [mailto:neckpain@nettaxi.com]
> Sent: Saturday, November 03, 2001 10:16 AM
> To: acpi-jp@jp.freebsd.org
> Cc: neckpain@nettaxi.com
> Subject: [acpi-jp 1427] Re: Fw: hwsleep.c, r1.1.1.9 killed resume from
> S1 state
> 
> 
> Thanks, Iwasaki-san.
> 
> On Sat, Nov 03, 2001 at 09:56:52PM +0900, Mitsuru IWASAKI wrote:
> > I've found a bug report on AcpiHwDisableNonWakeupGpes() and
> > AcpiHwEnableNonWakeupGpes() changes in -current ML .
> > Any ideas?
> 
> After tweaking and reading sources under /sys/contrib/dev/acpica,
> 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.
> 
> Anyway, with the attached patch, I can resume from S1 state now.
> 
