PCI: Rework default handling of suspend and resume
authorRafael J. Wysocki <rjw@sisk.pl>
Tue, 13 Jan 2009 23:38:13 +0000 (00:38 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sun, 18 Jan 2009 18:35:45 +0000 (10:35 -0800)
commit1354abbe6d62382e09f5c2af3bea6fd3b09f9b64
tree80b4d5de50d4f34fd7a033c9e24d75c1d6ed04f9
parentdb24e2ebb4136d9e2f252ba61f460808fa57818c
PCI: Rework default handling of suspend and resume

commit 355a72d75b3b4f4877db4c9070c798238028ecb5 upstream.

Rework the handling of suspend and resume of PCI devices which have
no drivers or the drivers of which do not provide any suspend-resume
callbacks in such a way that their standard PCI configuration
registers will be saved and restored with interrupts disabled.  This
should prevent such devices, including PCI bridges, from being
resumed too late to be able to function correctly during the resume
of the other PCI devices that may depend on them.

Also, to remove one possible source of future confusion, drop the
default handling of suspend and resume for PCI devices with drivers
providing the 'pm' object introduced by the new suspend-resume
framework (there are no such PCI drivers at the moment).

This patch addresses the regression from 2.6.26 tracked as
http://bugzilla.kernel.org/show_bug.cgi?id=12121 .

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
drivers/pci/pci-driver.c