summaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorMika Westerberg <mika.westerberg@linux.intel.com>2020-11-25 12:07:32 +0300
committerBjorn Helgaas <bhelgaas@google.com>2020-12-04 16:59:10 -0600
commit9c2cc571f92500d2d0f4e70466c90ee8b2b440e6 (patch)
tree78c6510abfdbd7c01acc6ee8195aa04248e90924 /drivers/pci
parent99efde6c9bb7b42eac0459876bf964fe08e5cef9 (diff)
downloadlinux-9c2cc571f92500d2d0f4e70466c90ee8b2b440e6.tar.bz2
PCI/PM: Do not generate wakeup event when runtime resuming device
When a PCI bridge is runtime resumed from D3cold, we resume any downstream devices as well. Previously, we also generated a wakeup event for each device even though this is not a wakeup signal coming from the hardware. Normally this does not cause problems but when combined with /sys/power/wakeup_count like using the steps below: # count=$(cat /sys/power/wakeup_count) # echo $count > /sys/power/wakeup_count # echo mem > /sys/power/state The system suspend cycle might fail at this point if a PCI bridge that was runtime suspended (D3cold) was runtime resumed for any reason. The runtime resume calls pci_resume_bus(), which generates a wakeup event and increases wakeup_count. Since this is not a real wakeup event, remove the call to pci_wakeup_event() from pci_resume_one(). [bhelgaas: reorder, commit log] Link: https://lore.kernel.org/r/20201125090733.77782-1-mika.westerberg@linux.intel.com Reported-by: Utkarsh Patel <utkarsh.h.patel@intel.com> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/pci.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 664aada79de2..0102cc973783 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -1176,7 +1176,6 @@ EXPORT_SYMBOL_GPL(pci_platform_power_transition);
static int pci_resume_one(struct pci_dev *pci_dev, void *ign)
{
- pci_wakeup_event(pci_dev);
pm_request_resume(&pci_dev->dev);
return 0;
}