Re: PCI PM: Restore standard config registers of all devices early

From: Rafael J. Wysocki
Date: Mon Feb 02 2009 - 12:21:20 EST


On Monday 02 February 2009, Benjamin Herrenschmidt wrote:
> On Mon, 2009-01-26 at 19:04 +0000, Linux Kernel Mailing List wrote:
> > Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=aa8c6c93747f7b55fa11e1624fec8ca33763a805
> > Commit: aa8c6c93747f7b55fa11e1624fec8ca33763a805
> > Parent: 0db29af1e767464d71b89410d61a1e5b668d0370
> > Author: Rafael J. Wysocki <rjw@xxxxxxx>
> > AuthorDate: Fri Jan 16 21:54:43 2009 +0100
> > Committer: Jesse Barnes <jbarnes@xxxxxxxxxxxxxxxx>
> > CommitDate: Fri Jan 16 12:57:58 2009 -0800
> >
> > PCI PM: Restore standard config registers of all devices early
>
> This seems to break resume on some PowerBooks (just reported by
> Andreas).

Yes, I saw the report in Bugzilla.

> I'm not yet sure what's up, but I can imagine various problems with the
> approach. For one, pci_enable_device() is the only place where the arch
> has a hook to turn back on things like clocks etc... to a device. You
> aren't supposed to touch at the config space before the arch got a
> chance to turn things back on. I agree there's somewhat a chicken and
> egg problem here, so we might need to look more closely at what that
> restore thing does and maybe add a call to the arch low level enable
> hook first... Or create a new hook.

I'd prefer to create a new hook, althouth there may be a problem with ACPI
vs interrupts off. In the meantime, I'd like to test some recent fixes on top
of this patch and try a couple of debug patches to see what's up (in the
Bugzilla if that's not a problem).

> I don't know how x86 does but I'm sure there must be some kind ACPI
> thingy that must be called too before you can touch a device, in case it
> got powered off by more than just the standard D states (ie, clock
> stopped on the bus or whole power plane switched off).
>
> I'll try to reproduce and think about it more, but it looks to me that
> this patch might not be quite the right approach yet.

Yeah.

Well, the approach is a bit x86-ish ...

Thanks,
Rafael
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/