remarkable-linux/drivers/pci
Rafael J. Wysocki db288c9c5f PCI / PM: restore the original behavior of pci_set_power_state()
Commit cc2893b6 (PCI: Ensure we re-enable devices on resume)
addressed the problem with USB not being powered after resume on
recent Lenovo machines, but it did that in a suboptimal way.
Namely, it should have changed the relevant code paths only,
which are pci_pm_resume_noirq() and pci_pm_restore_noirq() supposed
to restore the device's power and standard configuration registers
after system resume from suspend or hibernation.  Instead, however,
it modified pci_set_power_state() which is executed in several
other situations too.  That resulted in some undesirable effects,
like attempting to change a device's power state in the same way
multiple times in a row (up to as many as 4 times in a row in the
snd_hda_intel driver).

Fix the bug addressed by commit cc2893b6 in an alternative way,
by forcibly powering up all devices in pci_pm_default_resume_early(),
which is called by pci_pm_resume_noirq() and pci_pm_restore_noirq()
to restore the device's power and standard configuration registers,
and modifying pci_pm_runtime_resume() to avoid the forcible power-up
if not necessary.  Then, revert the changes made by commit cc2893b6
to make the confusion introduced by it go away.

Acked-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
2012-07-05 15:20:00 -06:00
..
hotplug PCI: make acpihp use __pci_remove_bus_device instead 2012-02-27 12:17:16 -08:00
pcie PCI/PM: add PCIe runtime D3cold support 2012-06-23 10:50:59 -06:00
.gitignore
access.c
ats.c
bus.c PCI: add struct pci_host_bridge_window with CPU/bus address offset 2012-02-23 20:19:00 -07:00
host-bridge.c PCI: add host bridge release support 2012-04-30 14:52:43 -06:00
hotplug-pci.c
hotplug.c
htirq.c
ioapic.c
iov.c PCI: Rename pci_remove_bus_device to pci_stop_and_remove_bus_device 2012-02-27 12:12:18 -08:00
irq.c
Kconfig PCI: add a PCI resource reallocation config option 2012-02-24 09:38:59 -08:00
Makefile PCI changes for the 3.5 merge window: 2012-05-21 16:24:54 -07:00
msi.c
msi.h
of.c
pci-acpi.c PCI/PM: add PCIe runtime D3cold support 2012-06-23 10:50:59 -06:00
pci-driver.c PCI / PM: restore the original behavior of pci_set_power_state() 2012-07-05 15:20:00 -06:00
pci-label.c
pci-stub.c
pci-sysfs.c PCI/PM: add PCIe runtime D3cold support 2012-06-23 10:50:59 -06:00
pci.c PCI / PM: restore the original behavior of pci_set_power_state() 2012-07-05 15:20:00 -06:00
pci.h PCI / PM: restore the original behavior of pci_set_power_state() 2012-07-05 15:20:00 -06:00
probe.c Merge branch 'topic/stratus' into next 2012-05-07 09:23:27 -06:00
proc.c
quirks.c PCI changes for the 3.5 merge window: 2012-05-21 16:24:54 -07:00
remove.c PCI: export __pci_remove_bus_device 2012-02-27 12:16:55 -08:00
rom.c
search.c
setup-bus.c Merge branch 'pci-next+probe_only+bus2res-fb127cb' of git://github.com/bjorn-helgaas/linux into linux-next 2012-02-24 14:25:33 -08:00
setup-irq.c
setup-res.c PCI: Move "pci reassigndev resource alignment" out of quirks.c 2012-02-24 14:37:26 -08:00
slot.c
syscall.c
vpd.c
xen-pcifront.c Two fixes for regressions: 2012-04-06 17:54:53 -07:00