]> git.baikalelectronics.ru Git - kernel.git/commit
PCI / ACPI / PM: Clear pme_poll for devices in D3cold on wakeup
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sat, 14 Sep 2013 01:38:20 +0000 (03:38 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 19 Sep 2013 22:24:43 +0000 (00:24 +0200)
commit925fbd2d479a0ee84fa40faa9b02ecee1251b1e3
tree66659b38081b032ae8d82919284516ef4158fee1
parent5667ee2a76214eb1f98d5ba5c60e1a9aa3440b67
PCI / ACPI / PM: Clear pme_poll for devices in D3cold on wakeup

Commit ada5073 (PCI/PM: add PCIe runtime D3cold support) added a
piece of code to pci_acpi_wake_dev() causing that function to behave
in a special way for devices in D3cold (so that their configuration
registers are not accessed before those devices are resumed).
However, it didn't take the clearing of the pme_poll flag into
account.  That has to be done for all devices, even if they are in
D3cold, or pci_pme_list_scan() will not know that wakeup has been
signaled for the device and will poll its PME Status bit
unnecessarily.

Fix the problem by moving the clearing of the pme_poll flag in
pci_acpi_wake_dev() before the code introduced by commit ada5073.

Reported-and-tested-by: David E. Box <david.e.box@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: 3.6+ <stable@vger.kernel.org> # 3.6+
drivers/pci/pci-acpi.c