From owner-acpi-jp@jp.freebsd.org  Thu Jul 26 02:08:22 2001
Received: (from daemon@localhost)
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) id CAA22917;
	Thu, 26 Jul 2001 02:08:22 +0900 (JST)
	(envelope-from owner-acpi-jp@jp.FreeBSD.org)
Received: from hebe.or.intel.com (jffdns02.or.intel.com [134.134.248.4])
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) with ESMTP id CAA22911;
	Thu, 26 Jul 2001 02:08:20 +0900 (JST)
	(envelope-from andrew.grover@intel.com)
Received: from SMTP (orsmsxvs01-1.jf.intel.com [192.168.65.200])
	by hebe.or.intel.com (8.9.1a+p1/8.9.1/d: relay.m4,v 1.41 2001/07/09 21:06:22 root Exp $) with SMTP id RAA12956;
	Wed, 25 Jul 2001 17:07:35 GMT
Received: from orsmsx29.jf.intel.com ([192.168.70.29]) by 192.168.70.200
  (Norton AntiVirus for Internet Email Gateways 1.0) ;
  Wed, 25 Jul 2001 17:07:34 0000 (GMT)
Received: by orsmsx29.jf.intel.com with Internet Mail Service (5.5.2653.19)
	id <PKBGG7FH>; Wed, 25 Jul 2001 10:07:32 -0700
Message-ID: <4148FEAAD879D311AC5700A0C969E89006CDDFB7@orsmsx35.jf.intel.com>
From: "Grover, Andrew" <andrew.grover@intel.com>
To: "'Mitsuru IWASAKI'" <iwasaki@jp.FreeBSD.org>, acpi-jp@jp.FreeBSD.org
Cc: msmith@freebsd.org
Date: Wed, 25 Jul 2001 10:07:30 -0700
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 1193
Subject: [acpi-jp 1193] RE: ACPICA 20010717: S1 causes power-off 
Errors-To: owner-acpi-jp@jp.freebsd.org
Sender: owner-acpi-jp@jp.freebsd.org
X-Originator: andrew.grover@intel.com

Applied to our tree.

> # yes, FreeBSD has experimental S[2-4] sleep support.

You guys are really making progress. Are you doing device power management
yet?

-- Andy

PS my apologies for this nasty code in the first place, but it is the only
way we could get S5 working on all machines.

> -----Original Message-----
> From: Mitsuru IWASAKI [mailto:iwasaki@jp.FreeBSD.org]
> Sent: Wednesday, July 25, 2001 8:50 AM
> To: acpi-jp@jp.FreeBSD.org; andrew.grover@intel.com
> Cc: msmith@freebsd.org
> Subject: Re: [acpi-jp 1188] RE: ACPICA 20010717: S1 causes power-off 
> 
> 
> Hi,
> 
> > I'm sure it is. I'll apply this to our tree right now.
> 
> Sorry, I've found that my TOSHIBA PORTEGE 3110CT have another problem
> with previous patch; got `kernel trap 12 with interrupts disabled' 
> on wakeup from S3 state.
> # yes, FreeBSD has experimental S[2-4] sleep support.
> 
> I think calling AcpiOsStall() causes this problem.  Following is new
> fix for this.
> 
> Thanks
> 
> Index: hwsleep.c
> ===================================================================
> RCS file: /home/ncvs/src/sys/contrib/dev/acpica/hwsleep.c,v
> retrieving revision 1.1.1.5
> diff -u -r1.1.1.5 hwsleep.c
> --- hwsleep.c	2001/07/21 03:55:15	1.1.1.5
> +++ hwsleep.c	2001/07/25 15:26:25
> @@ -295,11 +296,13 @@
>      AcpiHwRegisterWrite(ACPI_MTX_LOCK, PM1A_CONTROL, PM1AControl);
>      AcpiHwRegisterWrite(ACPI_MTX_LOCK, PM1B_CONTROL, PM1BControl);
>  
> -    /* wait a second, then try again */
> -    AcpiOsStall(1000000);
> -
> -    AcpiHwRegisterWrite(ACPI_MTX_LOCK, PM1_CONTROL,
> -        (1 << AcpiHwGetBitShift (SLP_EN_MASK)));
> +    if (SleepState > ACPI_STATE_S3) {
> +        /* wait a second, then try again */
> +        AcpiOsStall(1000000);
> +
> +        AcpiHwRegisterWrite(ACPI_MTX_LOCK, PM1_CONTROL,
> +            (1 << AcpiHwGetBitShift (SLP_EN_MASK)));
> +    }
>  
>      enable();
>  
> 

