aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-01-16 11:14:51 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-16 11:14:51 -0500
commit50246dd41ccbcb47beb06d6c1d9355f6b7137a11 (patch)
treed6febca069bd5734adb2383bbfe87192fad4ef7c /drivers/pci
parent7cb36b6ccdca03bd87e8faca7fd920643dd1aec7 (diff)
Revert "PCI PM: Register power state of devices during initialization"
This reverts commit 98e6e286d7b01deb7453b717aa38ebb69d6cefc0, as Yinghai Lu reports that it breaks kexec with at least the e1000 and e1000e drivers. The reason is that the shutdown sequence puts the hardware into D3 sleep, and the commit causes us to claim that it then is in D0 (running) state just because we don't understand the PM capabilities. Which then later makes "pci_set_power_state()" not do anything, and the device never wakes up properly and just returns 0xff to everything. Reported-by: Yinghai Lu <yinghai@kernel.org> Acked-by: From: Rafael J. Wysocki <rjw@sisk.pl> Cc: Jesse Barnes <jesse.barnes@intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/pci.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index c12f6c790698..e491fdedf705 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -1260,15 +1260,14 @@ void pci_pm_init(struct pci_dev *dev)
1260 /* find PCI PM capability in list */ 1260 /* find PCI PM capability in list */
1261 pm = pci_find_capability(dev, PCI_CAP_ID_PM); 1261 pm = pci_find_capability(dev, PCI_CAP_ID_PM);
1262 if (!pm) 1262 if (!pm)
1263 goto Exit; 1263 return;
1264
1265 /* Check device's ability to generate PME# */ 1264 /* Check device's ability to generate PME# */
1266 pci_read_config_word(dev, pm + PCI_PM_PMC, &pmc); 1265 pci_read_config_word(dev, pm + PCI_PM_PMC, &pmc);
1267 1266
1268 if ((pmc & PCI_PM_CAP_VER_MASK) > 3) { 1267 if ((pmc & PCI_PM_CAP_VER_MASK) > 3) {
1269 dev_err(&dev->dev, "unsupported PM cap regs version (%u)\n", 1268 dev_err(&dev->dev, "unsupported PM cap regs version (%u)\n",
1270 pmc & PCI_PM_CAP_VER_MASK); 1269 pmc & PCI_PM_CAP_VER_MASK);
1271 goto Exit; 1270 return;
1272 } 1271 }
1273 1272
1274 dev->pm_cap = pm; 1273 dev->pm_cap = pm;
@@ -1307,9 +1306,6 @@ void pci_pm_init(struct pci_dev *dev)
1307 } else { 1306 } else {
1308 dev->pme_support = 0; 1307 dev->pme_support = 0;
1309 } 1308 }
1310
1311 Exit:
1312 pci_update_current_state(dev, PCI_D0);
1313} 1309}
1314 1310
1315/** 1311/**