aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2009-02-03 20:01:15 -0500
committerJesse Barnes <jbarnes@virtuousgeek.org>2009-02-04 20:21:26 -0500
commitcbbc2f6b0d438f80831c20124137ea92f0e5149b (patch)
treed6742d56e3df1355a39df1c481430211d59f67f1 /drivers/pci
parent27be54a65c89c4b4aa9b25fc6fba31ffd01a08ca (diff)
PCI PM: Do not disable and enable bridges during suspend-resume
It is a mistake to disable and enable PCI bridges and PCI Express ports during suspend-resume, at least at the time when it is currently done. Disabling them may lead to problems with accessing devices behind them and they should be automatically enabled when their standard config spaces are restored. Fix this by not attempting to disable bridges during suspend and enable them during resume. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/pci-driver.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
index fdb6a697e05..ac6c9e493f4 100644
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
@@ -434,16 +434,18 @@ static int pci_pm_default_resume(struct pci_dev *pci_dev)
434{ 434{
435 pci_fixup_device(pci_fixup_resume, pci_dev); 435 pci_fixup_device(pci_fixup_resume, pci_dev);
436 436
437 if (!pci_is_bridge(pci_dev)) 437 if (pci_is_bridge(pci_dev))
438 pci_enable_wake(pci_dev, PCI_D0, false); 438 return 0;
439 439
440 pci_enable_wake(pci_dev, PCI_D0, false);
440 return pci_pm_reenable_device(pci_dev); 441 return pci_pm_reenable_device(pci_dev);
441} 442}
442 443
443static void pci_pm_default_suspend_generic(struct pci_dev *pci_dev) 444static void pci_pm_default_suspend_generic(struct pci_dev *pci_dev)
444{ 445{
445 /* If device is enabled at this point, disable it */ 446 /* If a non-bridge device is enabled at this point, disable it */
446 pci_disable_enabled_device(pci_dev); 447 if (!pci_is_bridge(pci_dev))
448 pci_disable_enabled_device(pci_dev);
447 /* 449 /*
448 * Save state with interrupts enabled, because in principle the bus the 450 * Save state with interrupts enabled, because in principle the bus the
449 * device is on may be put into a low power state after this code runs. 451 * device is on may be put into a low power state after this code runs.