From owner-acpi-jp@jp.FreeBSD.org Wed Mar 31 06:58:09 2004
Received: (from daemon@localhost)
	by castle.jp.FreeBSD.org (8.11.6p2+3.4W/8.11.3) id i2ULw9M52285;
	Wed, 31 Mar 2004 06:58:09 +0900 (JST)
	(envelope-from owner-acpi-jp@jp.FreeBSD.org)
Received: from harmony.village.org (warner@rover.bsdimp.com [204.144.255.66])
	by castle.jp.FreeBSD.org (8.11.6p2+3.4W/8.11.3) with ESMTP/inet id i2ULw8d52280
	for <acpi-jp@jp.FreeBSD.org>; Wed, 31 Mar 2004 06:58:08 +0900 (JST)
	(envelope-from imp@bsdimp.com)
Received: from localhost (warner@rover2.village.org [10.0.0.1])
	by harmony.village.org (8.12.10/8.12.9) with ESMTP id i2ULw2kj014254;
	Tue, 30 Mar 2004 14:58:02 -0700 (MST)
	(envelope-from imp@bsdimp.com)
Message-Id: <20040330.145814.04787623.imp@bsdimp.com>
To: nate@root.org
Cc: acpi-jp@jp.FreeBSD.org
From: "M. Warner Losh" <imp@bsdimp.com>
In-Reply-To: <20040330.134534.82839532.imp@bsdimp.com>
References: <20040330.133504.94843223.imp@bsdimp.com>
	<20040330124038.L82530@root.org>
	<20040330.134534.82839532.imp@bsdimp.com>
X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Reply-To: acpi-jp@jp.FreeBSD.org
Precedence: list
Date: Tue, 30 Mar 2004 14:58:14 -0700
X-Sequence: acpi-jp 3169
Subject: [acpi-jp 3169] Re: hot after resume
Sender: owner-acpi-jp@jp.FreeBSD.org
X-Originator: imp@bsdimp.com
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+040307

In message: <20040330.134534.82839532.imp@bsdimp.com>
            "M. Warner Losh" <imp@bsdimp.com> writes:
: In message: <20040330124038.L82530@root.org>
:             Nate Lawson <nate@root.org> writes:
: : On Tue, 30 Mar 2004, M. Warner Losh wrote:
: : > In message: <20040330122026.T81785@root.org>
: : >             Nate Lawson <nate@root.org> writes:
: : > : I had a look at how Linux implements suspend/resume.  All drivers have to
: : > : restore their own PCI BARs.  I think there is work going on there to do
: : > : this automatically in 2.6.x.  For FreeBSD, as you know, we're going to
: : > : handle this for drivers also via code in the power tree.  Most drivers
: : > : don't do this, hence S3 is worse on FreeBSD than Linux at the moment.
: : >
: : > Except on my laptop, which is running those patches.
: : >
: : > I'm just going to start committing this to freebsd and deal with the
: : > people it breaks...
: : 
: : Excellent!  I hope you mean just the BAR restoration, not the power
: : transition stuff (D0-D3).  That needs a bit more testing.
: 
: Both!  They are so interrelated that I have trouble teasing them
: apart.  Let people in current suffer :-)  Clearly people aren't
: testing my patches.
: 
: Actually, that's not entirely true.  There's an easy way to disable
: some of the power stuff, and I'll likely do that as a first shot.

BTW, you can find my patches here:

http://people.freebsd.org/~imp/power-20040330.diff.gz

They have the following problems:

1) Need to handle the !acpi host bridge case of resource allocation.
2) unloading a driver that has resources reserved causes them to be
   really freed, not merely returned to the reserved pool.  This can
   cause problems.
3) Some of the power stuff is effectively disabled.
4) There likely are hacks in there I've forgotten about.

Warner


