Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

+2 -6
+2 -6
drivers/pci/pci.c
··· 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; ··· 1306 1307 } else { 1307 1308 dev->pme_support = 0; 1308 1309 } 1309 - 1310 - Exit: 1311 - pci_update_current_state(dev, PCI_D0); 1312 1310 } 1313 1311 1314 1312 /**