Commit 50246dd41ccbcb47beb06d6c1d9355f6b7137a11
1 parent
7cb36b6ccd
Exists in
master
and in
20 other branches
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>
Showing 1 changed file with 2 additions and 6 deletions Side-by-side Diff
drivers/pci/pci.c
... | ... | @@ -1260,15 +1260,14 @@ |
1260 | 1260 | /* find PCI PM capability in list */ |
1261 | 1261 | pm = pci_find_capability(dev, PCI_CAP_ID_PM); |
1262 | 1262 | if (!pm) |
1263 | - goto Exit; | |
1264 | - | |
1263 | + return; | |
1265 | 1264 | /* Check device's ability to generate PME# */ |
1266 | 1265 | pci_read_config_word(dev, pm + PCI_PM_PMC, &pmc); |
1267 | 1266 | |
1268 | 1267 | if ((pmc & PCI_PM_CAP_VER_MASK) > 3) { |
1269 | 1268 | dev_err(&dev->dev, "unsupported PM cap regs version (%u)\n", |
1270 | 1269 | pmc & PCI_PM_CAP_VER_MASK); |
1271 | - goto Exit; | |
1270 | + return; | |
1272 | 1271 | } |
1273 | 1272 | |
1274 | 1273 | dev->pm_cap = pm; |
... | ... | @@ -1307,9 +1306,6 @@ |
1307 | 1306 | } else { |
1308 | 1307 | dev->pme_support = 0; |
1309 | 1308 | } |
1310 | - | |
1311 | - Exit: | |
1312 | - pci_update_current_state(dev, PCI_D0); | |
1313 | 1309 | } |
1314 | 1310 | |
1315 | 1311 | /** |