From owner-acpi-jp@jp.freebsd.org  Thu Nov  8 06:10:27 2001
Received: (from daemon@localhost)
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) id GAA04302;
	Thu, 8 Nov 2001 06:10:27 +0900 (JST)
	(envelope-from owner-acpi-jp@jp.FreeBSD.org)
Received: from alfik.ms.mff.cuni.cz (alfik.ms.mff.cuni.cz [195.113.19.71])
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) with ESMTP id GAA04296;
	Thu, 8 Nov 2001 06:10:24 +0900 (JST)
	(envelope-from root@bug.ucw.cz)
Received: from root@slip11.ms.mff.cuni.cz [195.113.20.211]
	by alfik.ms.mff.cuni.cz (8.9.3/2.1/20011017.1454) with ESMTP
	id WAA07234; Wed, 7 Nov 2001 22:05:32 +0100 (MET)
Received: from bug.ucw.cz (root@bug.ucw.cz [10.0.0.3])
	by Elf.ucw.cz (8.8.8/8.8.5) with ESMTP id VAA28347;
	Wed, 7 Nov 2001 21:59:37 +0100
Received: (from root@localhost)
	by bug.ucw.cz (8.8.8/8.8.5) id WAA01537;
	Wed, 7 Nov 2001 22:59:45 +0100
Date: Wed, 7 Nov 2001 03:10:34 +0000
From: Pavel Machek <pavel@suse.cz>
To: Mitsuru IWASAKI <iwasaki@jp.freebsd.org>
Cc: acpi-jp@jp.freebsd.org, andrew.grover@intel.com, jhb@FreeBSD.org,
        acpi@phobos.fachschaften.tu-muenchen.de
Message-ID: <20011107031034.D35@toy.ucw.cz>
References: <59885C5E3098D511AD690002A5072D3C42D6CC@orsmsx111.jf.intel.com> <20011105.230144.41626631.iwasaki@jp.FreeBSD.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Mailer: Mutt 1.0.1i
In-Reply-To: <20011105.230144.41626631.iwasaki@jp.FreeBSD.org>; from iwasaki@jp.freebsd.org on Mon, Nov 05, 2001 at 11:01:44PM +0900
Reply-To: acpi-jp@jp.freebsd.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+010328
X-Sequence: acpi-jp 1454
Subject: [acpi-jp 1454] Re: [Acpi] Re: Libretto L2
Errors-To: owner-acpi-jp@jp.freebsd.org
Sender: owner-acpi-jp@jp.freebsd.org
X-Originator: pavel@suse.cz

Hi!
> > I made that change on 8/31 with the checkin comment: "fix compiler error".
> > This is both incorrect and unhelpful. ;-)
> > 
> > Soooo....I'll make the change, but it would be great if you could keep
> > digging on why this should cause problems, or if someone wants to speak up
> > for why I made this change in the first place?
> 
> I've noticed that the previous patche is not enough for some machines.
> i.e.Some BIOSes don't set WAK_STS bit, so it can be Infinite loop in
> S1 sleep case.
> In FreeBSD, we have this workaround, I think it would be useful for
> Linux people too.

This is very similar to patch I created, *but* you really need to print
error message about missbehaving ACPI.

								Pavel
> @@ -318,9 +319,16 @@
>  
>      /* wait until we enter sleep state */
>  
> +    Retry = 1000;
>      do 
>      {
> -        AcpiOsStall(10000);
> +        /*
> +         * Some BIOSes don't set WAK_STS at all,
> +         * give up waiting for wakeup if we time out.
> +         */
> +         if (Retry-- == 0) {
> +             break;             /* giving up */
> +         }
>      }
>      while (!AcpiHwRegisterBitAccess (ACPI_READ, ACPI_MTX_LOCK, WAK_STS));
>  
> 
> _______________________________________________
> acpi maillist  -  acpi@phobos.fs.tum.de
> https://phobos.fs.tum.de/mailman/listinfo/acpi

-- 
Philips Velo 1: 1"x4"x8", 300gram, 60, 12MB, 40bogomips, linux, mutt,
details at http://atrey.karlin.mff.cuni.cz/~pavel/velo/index.html.

