Re: What should PCI core do during suspend-resume? (was: Re: 2.6.29-rc3: tg3 dead after resume)

From: Rafael J. Wysocki
Date: Sat Jan 31 2009 - 20:25:15 EST

On Sunday 01 February 2009, Linus Torvalds wrote:
> On Sun, 1 Feb 2009, Rafael J. Wysocki wrote:
> >
> > All this leads to the conclusion that we should put devices into low power
> > states with interrupts off and this seems to imply that we'll need to make the
> > AML interpreter allow us to run AML with interrupts off.
> How many devices actually have the _PS3 method (or whatever it is that we
> end up executing)? We might be able to simply flag it, and say "ok, if we
> have a _PS3 method, we'll have to suspend early, otherwise we can leave it
> for a late suspend".

That seems doable at first sight, although I think we should take D1 and D2
into account too (the ACPI rules may be that for S3, ie. suspend to RAM, given
device should be put into D2, for example). We have a function for checking
if device is power-manageable by ACPI.

Still, in that case, should the rule be that if the device is power-manageable
by ACPI, the PCI core is supposed to put it into a low power state (using ACPI)
with interrupts on and if the device is not power-manageable by ACPI, the
PCI core is supposed to put it into a low power state using the native PM?

> Definitely not perfect, but perhaps a way to get the safe thing on 99% of
> all cases, and have to live with the horrid ACPI rules on some things.

They are not that uncommon AFAICS. On all of my boxes there are devices
power-manageable by ACPI. Usually they are USB controllers and network
adapters, but sometimes it happens to sound cards too.

> I thought the _DSW thing is common for setting up wakeup, but _PSx is not.
> But I have not looked at many ACPI tables in my life. I try to active
> avoid it if I at all humanly can.

Usually, we need to use ACPI to set up wake-up and then use ACPI to put the
device into a low power state. Otherwise, the wake-up may not work.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at