summaryrefslogtreecommitdiff
path: root/drivers/pci/pci.h
diff options
context:
space:
mode:
authorLukas Wunner <lukas@wunner.de>2016-09-18 06:39:20 +0300
committerBjorn Helgaas <bhelgaas@google.com>2016-09-28 19:49:21 +0300
commita0d2a959d3da343554523d26902de1d40a9e5c28 (patch)
tree9fe0d30920a8e2a3107d67a451ab48d1bf394502 /drivers/pci/pci.h
parenta6a64026c0cd1a76a0c8ab1c05a421aa4821887b (diff)
downloadlinux-a0d2a959d3da343554523d26902de1d40a9e5c28.tar.xz
PCI: Avoid unnecessary resume after direct-complete
Commit 58a1fbbb2ee8 ("PM / PCI / ACPI: Kick devices that might have been reset by firmware") added a runtime resume for devices that were runtime suspended when the system entered sleep. The motivation was that devices might be in a reset-power-on state after waking from system sleep, so their power state as perceived by Linux (stored in pci_dev->current_state) would no longer reflect reality. By resuming such devices, we allow them to return to a low-power state via autosuspend and also bring their current_state in sync with reality. However for devices that are *not* in a reset-power-on state, doing an unconditional resume wastes energy. A more refined approach is called for which issues a runtime resume only if the power state after direct-complete is shallower than it was before. To achieve this, update the device's current_state and compare it to its pre-sleep value. Signed-off-by: Lukas Wunner <lukas@wunner.de> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/pci/pci.h')
0 files changed, 0 insertions, 0 deletions