linux-imx/drivers/pci
Rafael J. Wysocki 74c74ba772 PCI / PM: Force devices to D0 in pci_pm_thaw_noirq()
commit 5839ee7389 upstream.

It is incorrect to call pci_restore_state() for devices in low-power
states (D1-D3), as that involves the restoration of MSI setup which
requires MMIO to be operational and that is only the case in D0.

However, pci_pm_thaw_noirq() may do that if the driver's "freeze"
callbacks put the device into a low-power state, so fix it by making
it force devices into D0 via pci_set_power_state() instead of trying
to "update" their power state which is pointless.

Fixes: e60514bd44 (PCI/PM: Restore the status of PCI devices across hibernation)
Reported-by: Thomas Gleixner <tglx@linutronix.de>
Reported-by: Maarten Lankhorst <dev@mblankhorst.nl>
Tested-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Maarten Lankhorst <dev@mblankhorst.nl>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
2018-03-03 15:50:48 +00:00
..
hotplug PCI: shpchp: Enable bridge bus mastering if MSI is enabled 2017-11-26 13:51:01 +00:00
pcie PCI/AER: Report non-fatal errors only to the affected endpoint 2018-02-13 18:32:08 +00:00
.gitignore
access.c PCI: Use function 0 VPD for identical functions, regular VPD for others 2015-11-27 12:48:19 +00:00
ats.c PCI: fix ats compile failure 2011-12-05 10:31:25 -08:00
bus.c PCI/sysfs: move bus cpuaffinity to class dev_attrs 2011-05-21 12:17:13 -07:00
hotplug-pci.c pci: Fix files needing export.h for EXPORT_SYMBOL/THIS_MODULE 2011-10-31 19:31:22 -04:00
hotplug.c PCI: Generate uppercase hex for modalias var in uevent 2015-05-09 23:16:11 +01:00
htirq.c pci: Fix files needing export.h for EXPORT_SYMBOL/THIS_MODULE 2011-10-31 19:31:22 -04:00
ioapic.c pci: Fix files needing export.h for EXPORT_SYMBOL/THIS_MODULE 2011-10-31 19:31:22 -04:00
iov.c PCI: defer enablement of SRIOV BARS 2011-12-05 10:30:22 -08:00
irq.c pci: Fix files needing export.h for EXPORT_SYMBOL/THIS_MODULE 2011-10-31 19:31:22 -04:00
Kconfig Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci 2011-11-23 14:58:46 -08:00
Makefile pci: frv architecture needs generic setup-bus infrastructure 2013-09-10 01:57:37 +01:00
msi.c PCI: msi: Disable msi interrupts when we initialize a pci device 2012-01-25 16:13:18 -08:00
msi.h PCI: MSI: Move MSI-X entry definition to pci_regs.h 2010-12-23 12:53:07 -08:00
of.c PCI: OF: Don't crash when bridge parent is NULL. 2011-08-19 08:51:37 -07:00
pci-acpi.c PCI: Rework ASPM disable code 2012-02-06 09:41:06 -08:00
pci-driver.c PCI / PM: Force devices to D0 in pci_pm_thaw_noirq() 2018-03-03 15:50:48 +00:00
pci-label.c pci-label.c: size_t misspelled as mode_t 2011-07-26 13:01:09 -04:00
pci-stub.c PCI: pci-stub: ignore zero-length id parameters 2010-12-23 12:53:52 -08:00
pci-sysfs.c PCI: Fix pci_mmap_fits() for HAVE_PCI_RESOURCE_TO_USER platforms 2017-08-26 02:14:00 +01:00
pci.c PCI: Freeze PME scan before suspending devices 2017-08-26 02:14:01 +01:00
pci.h PCI: make cardbus-bridge resources optional 2011-08-01 11:50:40 -07:00
probe.c PCI: Disable all BAR sizing for devices with non-compliant BARs 2016-08-22 22:37:11 +01:00
proc.c PCI: Only allow WC mmap on prefetchable resources 2017-08-26 02:14:00 +01:00
quirks.c PCI: Correct PCI_STD_RESOURCE_END usage 2017-10-12 15:27:10 +01:00
remove.c PCI/PM: Clean up PME state when removing a device 2013-03-06 03:23:58 +00:00
rom.c PCI: Fix infinite loop with ROM image of size 0 2015-05-09 23:16:13 +01:00
search.c PCI: use for_each_pci_dev() 2010-07-30 09:47:22 -07:00
setup-bus.c PCI : Calculate right add_size 2012-12-06 11:20:13 +00:00
setup-irq.c PCI: Make the struct pci_dev * argument of pci_fixup_irqs const. 2011-07-22 08:26:06 -07:00
setup-res.c PCI: fix truncation of resource size to 32 bits 2013-11-28 14:01:58 +00:00
slot.c pci: add module.h to files implicitly relying on its presence. 2011-10-31 19:31:23 -04:00
syscall.c
vpd.c pci: Fix files needing export.h for EXPORT_SYMBOL/THIS_MODULE 2011-10-31 19:31:22 -04:00
xen-pcifront.c xen/pcifront: Fix mysterious crashes when NUMA locality information was extracted. 2016-04-01 01:54:32 +01:00