aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2018-01-03 01:38:27 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2018-01-09 13:09:17 +0100
commit877b3729ca03b00800b99ac0c076e9456ef3ae6b (patch)
tree5635d56757907390ac0659b441d6c116632ec062 /drivers/pci
parentPM / wakeup: Add device_set_wakeup_path() helper to control wakeup path (diff)
downloadlinux-dev-877b3729ca03b00800b99ac0c076e9456ef3ae6b.tar.xz
linux-dev-877b3729ca03b00800b99ac0c076e9456ef3ae6b.zip
PCI / PM: Use SMART_SUSPEND and LEAVE_SUSPENDED flags for PCIe ports
Make the PCIe port driver set DPM_FLAG_SMART_SUSPEND and DPM_FLAG_LEAVE_SUSPENDED for the devices handled by it to benefit from the opportunistic optimizations in the PCI layer enabled by these flags. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/pcie/portdrv_pci.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c
index ffbf4e723527..fb1c1bb87316 100644
--- a/drivers/pci/pcie/portdrv_pci.c
+++ b/drivers/pci/pcie/portdrv_pci.c
@@ -150,6 +150,9 @@ static int pcie_portdrv_probe(struct pci_dev *dev,
pci_save_state(dev);
+ dev_pm_set_driver_flags(&dev->dev, DPM_FLAG_SMART_SUSPEND |
+ DPM_FLAG_LEAVE_SUSPENDED);
+
if (pci_bridge_d3_possible(dev)) {
/*
* Keep the port resumed 100ms to make sure things like