summaryrefslogtreecommitdiffstats
path: root/drivers/pci/pci.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-07-21 14:38:08 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-08-01 14:05:02 +0200
commitbaecc470d5fd6e2d94eb2a7e242ba291ac7182ac (patch)
treeb1fa6305b2b2f5e35b52c088148785eddd039010 /drivers/pci/pci.c
parent16f73eb02d7e1765ccab3d2018e0bd98eb93d973 (diff)
downloadblackbird-obmc-linux-baecc470d5fd6e2d94eb2a7e242ba291ac7182ac.tar.gz
blackbird-obmc-linux-baecc470d5fd6e2d94eb2a7e242ba291ac7182ac.zip
PCI / PM: Skip bridges in pci_enable_wake()
PCI bridges only have a reason to generate wakeup signals on behalf of devices below them, so avoid preparing bridges for wakeup directly in pci_enable_wake(). Also drop the pci_has_subordinate() check from pci_pm_default_resume() as this will be done by pci_enable_wake() itself now. 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>
Diffstat (limited to 'drivers/pci/pci.c')
-rw-r--r--drivers/pci/pci.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index af0cc3456dc1..0d142031ebfb 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -1912,6 +1912,13 @@ int pci_enable_wake(struct pci_dev *dev, pci_power_t state, bool enable)
{
int ret = 0;
+ /*
+ * Bridges can only signal wakeup on behalf of subordinate devices,
+ * but that is set up elsewhere, so skip them.
+ */
+ if (pci_has_subordinate(dev))
+ return 0;
+
/* Don't do the same thing twice in a row for one device. */
if (!!enable == !!dev->wakeup_prepared)
return 0;
OpenPOWER on IntegriCloud