linux-stable/drivers/pci
Rafael J. Wysocki 656088aa9b PCI / PM: Do not clear state_saved for devices that remain suspended
The state_saved flag should not be cleared in pci_pm_suspend() if the
given device is going to remain suspended, or the device's config
space will not be restored properly during the subsequent resume.

Namely, if the device is going to stay in suspend, both the late
and noirq callbacks return early for it, so if its state_saved flag
is cleared in pci_pm_suspend(), it will remain unset throughout the
remaining part of suspend and resume and pci_restore_state() called
for the device going forward will return without doing anything.

For this reason, change pci_pm_suspend() to only clear state_saved
if the given device is not going to remain suspended.  [This is
analogous to what commit ae860a19f3 (PCI / PM: Do not clear
state_saved in pci_pm_freeze() when smart suspend is set) did for
hibernation.]

Fixes: c4b65157ae (PCI / PM: Take SMART_SUSPEND driver flag into account)
Cc: 4.15+ <stable@vger.kernel.org> # 4.15+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
2018-05-24 10:15:51 +02:00
..
cadence PCI: endpoint: Make epc->ops->clear_bar()/pci_epc_clear_bar() take struct *epf_bar 2018-04-03 12:38:05 +01:00
dwc PCI: kirin: Fix reset gpio name 2018-04-17 11:27:38 +01:00
endpoint PCI: endpoint: Make sure that BAR_5 does not have 64-bit flag set when clearing 2018-04-03 12:38:05 +01:00
host PCI: aardvark: Fix PCIe Max Read Request Size setting 2018-04-16 11:48:45 +01:00
hotplug powerpc updates for 4.17 2018-04-07 12:08:19 -07:00
pcie Merge branch 'pci/portdrv' 2018-04-04 13:27:58 -05:00
switch vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
access.c Merge branch 'pci/vpd' 2018-04-04 13:28:40 -05:00
ats.c PCI: Tidy comments 2018-03-19 14:20:43 -05:00
bus.c PCI: Tidy comments 2018-03-19 14:20:43 -05:00
ecam.c PCI: Add SPDX GPL-2.0 to replace GPL v2 boilerplate 2018-01-28 15:48:29 -06:00
host-bridge.c PCI: Tidy comments 2018-03-19 14:20:43 -05:00
iov.c Merge branch 'pci/virtualization' 2018-04-04 13:28:26 -05:00
irq.c PCI: Add wrappers for dev_printk() 2018-01-18 12:55:24 -06:00
Kconfig Merge branch 'pci/spdx' into next 2018-02-01 11:40:07 -06:00
Makefile PCI: Tidy Makefiles 2018-03-19 14:20:41 -05:00
mmap.c PCI: Tidy comments 2018-03-19 14:20:43 -05:00
msi.c PCI: Tidy comments 2018-03-19 14:20:43 -05:00
of.c Merge branch 'pci/spdx' into next 2018-02-01 11:40:07 -06:00
pci-acpi.c PCI: Tidy comments 2018-03-19 14:20:43 -05:00
pci-driver.c PCI / PM: Do not clear state_saved for devices that remain suspended 2018-05-24 10:15:51 +02:00
pci-label.c PCI: Tidy comments 2018-03-19 14:20:43 -05:00
pci-mid.c PCI: Add SPDX GPL-2.0 to replace GPL v2 boilerplate 2018-01-28 15:48:29 -06:00
pci-stub.c PCI: Tidy comments 2018-03-19 14:20:43 -05:00
pci-sysfs.c Merge branch 'pci/vpd' 2018-04-04 13:28:40 -05:00
pci.c PCI / PM: Check device_may_wakeup() in pci_enable_wake() 2018-05-10 16:50:26 +02:00
pci.h Merge branch 'pci/vpd' 2018-04-04 13:28:40 -05:00
probe.c pci-v4.17-changes 2018-04-06 18:31:06 -07:00
proc.c PCI: Tidy comments 2018-03-19 14:20:43 -05:00
quirks.c PCI: Mark Broadcom HT1100 and HT2000 Root Port Extended Tags as broken 2018-04-10 14:44:21 -05:00
remove.c PCI: Add SPDX GPL-2.0 when no license was specified 2018-01-26 11:45:16 -06:00
rom.c PCI: Tidy comments 2018-03-19 14:20:43 -05:00
search.c PCI: Tidy comments 2018-03-19 14:20:43 -05:00
setup-bus.c PCI: Tidy comments 2018-03-19 14:20:43 -05:00
setup-irq.c PCI: Tidy comments 2018-03-19 14:20:43 -05:00
setup-res.c PCI: Remove messages about reassigning resources 2018-04-11 08:46:50 -05:00
slot.c Merge branch 'pci/misc' 2018-04-04 13:27:45 -05:00
syscall.c PCI: Tidy comments 2018-03-19 14:20:43 -05:00
vc.c Merge branch 'pci/spdx' into next 2018-02-01 11:40:07 -06:00
vpd.c pci-v4.17-changes 2018-04-06 18:31:06 -07:00
xen-pcifront.c PCI: Tidy comments 2018-03-19 14:20:43 -05:00