]> git.baikalelectronics.ru Git - kernel.git/commit
PCI / PM: Avoid resuming PCI devices during system suspend
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 21 Jan 2015 01:17:42 +0000 (02:17 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 23 Jan 2015 21:13:54 +0000 (22:13 +0100)
commit4699c042045b9662d2ee05ed7667f507d58bb3f0
tree59bd2a6efea9c9cb4cca404f35ae94c67f0dd988
parente6fc7c0e7fe1c9c8d93d2cc7a477bb74a684758c
PCI / PM: Avoid resuming PCI devices during system suspend

Commit d08a9ad55428 (ACPI / PM: Avoid resuming devices in ACPI PM
domain during system suspend) modified the ACPI PM domain's system
suspend callbacks to allow devices attached to it to be left in the
runtime-suspended state during system suspend so as to optimize
the suspend process.

This was based on the general mechanism introduced by commit
a90637418063 (PM / sleep: Mechanism to avoid resuming runtime-suspended
devices unnecessarily).

Extend that approach to PCI devices by modifying the PCI bus type's
->prepare callback to return 1 for devices that are runtime-suspended
when it is being executed and that are in a suitable power state and
need not be resumed going forward.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/pci-acpi.c
drivers/pci/pci-driver.c
drivers/pci/pci.c
drivers/pci/pci.h