Subject: Re: ACPI suspend support.
To: Jared D. McNeill <jmcneill@invisible.ca>
From: Kentaro A. Kurahone <kurahone@sigusr1.org>
List: tech-kern
Date: 01/26/2005 20:34:21
On Wed, Jan 26, 2005 at 12:44:16PM -0400, Jared D. McNeill wrote:
> On Wed, 2005-01-26 at 01:31 +0000, Kentaro A. Kurahone wrote:
> > On Tue, Jan 25, 2005 at 09:19:34PM -0400, Jared D. McNeill wrote:
> > > On Tue, 2005-01-25 at 17:00 -0800, Jason Thorpe wrote:
> > > > On Jan 25, 2005, at 4:18 PM, Matt Thomas wrote:
> > > > 
> > > > > Well, you almost want the driver to soft-detach, and then go
> > > > > through autoconf again on power-on giving preferences to those
> > > > > things that soft-detached.
> > > > 
> > > > That really kind of depends on what sort of bus you're talking about, 
> > > > but yah, that's also true.
> > > > 
> > > > (You certainly want to do that with USB, 1394, etc.)
> > > 
> > > What about the case of a umass device where we have a filesystem mounted
> > > from it? Should we unmount before sleeping, or handle this device
> > > differently? (I ask because I'm looking into a suitable powerhook for
> > > piixide in ACPI S3 sleep right now, and I can't very well unmount the
> > > root filesystem before suspending).
> > 
> > For piixide, you shouldn't need to.  Just saveoff/restore the pci config
> > space, and thwack the controller.
> 
> Here's a preliminary patch that actually makes my laptop recover from S3
> sleep (first time I've ever seen this happen with NetBSD!).
> 
>   http://www.invisible.ca/~jmcneill/netbsd/d600/acpi-sleep-piixide.patch
> 
> It doesn't of course ensure that all data is sync'd to disk, but it's a
> HUGE improvement over the behaviour I was seeing before. Combined with
> my acpi-wakecode patch, I'm actually able to drop to S3 and resume with
> my Latitude D600 (still missing some powerhooks for bge and cbb, but
> I'll work on that next).
> 
> If there aren't any objections, I'd like to commit both the
> acpi-sleep-piixide and acpi-wakecode patches to HEAD.

Looks good.  I have cbb, auich, agp_i810, and pms fixed up.  I'm going to
rework those to use pci_state_saveoff/restore.

-- 
Kentaro A. Kurahone
SIGUSR1 Research and Development