]> git.baikalelectronics.ru Git - kernel.git/commit
Fix ACPI suspend / device suspend ordering problem
authorLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 16 May 2007 22:28:14 +0000 (15:28 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 16 May 2007 22:33:19 +0000 (15:33 -0700)
commitbe2a4cded6d9d1310c3a5a0fa0c377d9616a01e9
tree70ae152f573b5d0f5078e2506830c3b804ab6816
parent3f8faac663ea205f7d6c1cdb22b12be70efe022b
Fix ACPI suspend / device suspend ordering problem

In commit 9da62e90a7b403744f2222a4af9bc06c26d386dd we fixed the resume
ordering, so that the ACPI low-level resume code was called before the
actual driver resume was called. However, that broke the nesting logic
of suspend and resume, and we continued to suspend the devices _after_
we the ACPI device suspend code was called.

That resulted in us saving PCI state for devices that had already been
changed by ACPI, and in some cases disabled entirely (causing the PCI
save_state to be all-ones).  Which in turn caused the wrong state to be
written back on resume.

This moves the ACPI device suspend to after the device model per-device
suspend() calls. This fixes the bogus state save.

Thanks to Lukáš Hejtmánek for testing.

Acked-by: Lukas Hejtmanek <xhejtman@ics.muni.cz>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Len Brown <len.brown@intel.com>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/power/main.c