Revert "PCI PM: Register power state of devices during initialization"

This reverts commit 98e6e286d7, 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>
This commit is contained in:
Linus Torvalds 2009-01-16 08:14:51 -08:00
parent 7cb36b6ccd
commit 50246dd41c
1 changed files with 2 additions and 6 deletions

View File

@ -1260,15 +1260,14 @@ void pci_pm_init(struct pci_dev *dev)
/* find PCI PM capability in list */ /* find PCI PM capability in list */
pm = pci_find_capability(dev, PCI_CAP_ID_PM); pm = pci_find_capability(dev, PCI_CAP_ID_PM);
if (!pm) if (!pm)
goto Exit; return;
/* Check device's ability to generate PME# */ /* Check device's ability to generate PME# */
pci_read_config_word(dev, pm + PCI_PM_PMC, &pmc); pci_read_config_word(dev, pm + PCI_PM_PMC, &pmc);
if ((pmc & PCI_PM_CAP_VER_MASK) > 3) { if ((pmc & PCI_PM_CAP_VER_MASK) > 3) {
dev_err(&dev->dev, "unsupported PM cap regs version (%u)\n", dev_err(&dev->dev, "unsupported PM cap regs version (%u)\n",
pmc & PCI_PM_CAP_VER_MASK); pmc & PCI_PM_CAP_VER_MASK);
goto Exit; return;
} }
dev->pm_cap = pm; dev->pm_cap = pm;
@ -1307,9 +1306,6 @@ void pci_pm_init(struct pci_dev *dev)
} else { } else {
dev->pme_support = 0; dev->pme_support = 0;
} }
Exit:
pci_update_current_state(dev, PCI_D0);
} }
/** /**