Skip to content
Commit 5839ee73 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

PCI / PM: Force devices to D0 in pci_pm_thaw_noirq()



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: e60514bd (PCI/PM: Restore the status of PCI devices across hibernation)
Cc: 4.13+ <stable@vger.kernel.org> # 4.13+
Reported-by: default avatarThomas Gleixner <tglx@linutronix.de>
Reported-by: default avatarMaarten Lankhorst <dev@mblankhorst.nl>
Tested-by: default avatarThomas Gleixner <tglx@linutronix.de>
Tested-by: default avatarMaarten Lankhorst <dev@mblankhorst.nl>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: default avatarBjorn Helgaas <bhelgaas@google.com>
parent 1291a0d5
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment