aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/pci-acpi.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2011-11-06 16:21:46 -0500
committerJesse Barnes <jbarnes@virtuousgeek.org>2011-12-05 13:21:49 -0500
commita424948dde8421089826e2f782d0efe9e565707e (patch)
tree91eb69ddb607c9a326741ad580e88018c6184ea9 /drivers/pci/pci-acpi.c
parentd90116ea38f7768dac0349f01ffbc2663d63b7e9 (diff)
PCI/ACPI/PM: Avoid resuming devices that don't signal PME
Modify pci_acpi_wake_dev() to avoid resuming PME-capable devices whose PME Status bits are not set, which may happen currently if several devices are associated with the same wakeup GPE and all of them are notified whenever at least one of them signals PME. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/pci-acpi.c')
-rw-r--r--drivers/pci/pci-acpi.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c
index c8e75851a314..060fd22a1103 100644
--- a/drivers/pci/pci-acpi.c
+++ b/drivers/pci/pci-acpi.c
@@ -45,16 +45,20 @@ static void pci_acpi_wake_dev(acpi_handle handle, u32 event, void *context)
45{ 45{
46 struct pci_dev *pci_dev = context; 46 struct pci_dev *pci_dev = context;
47 47
48 if (event == ACPI_NOTIFY_DEVICE_WAKE && pci_dev) { 48 if (event != ACPI_NOTIFY_DEVICE_WAKE || !pci_dev)
49 return;
50
51 if (!pci_dev->pm_cap || !pci_dev->pme_support
52 || pci_check_pme_status(pci_dev)) {
49 if (pci_dev->pme_poll) 53 if (pci_dev->pme_poll)
50 pci_dev->pme_poll = false; 54 pci_dev->pme_poll = false;
51 55
52 pci_wakeup_event(pci_dev); 56 pci_wakeup_event(pci_dev);
53 pci_check_pme_status(pci_dev);
54 pm_runtime_resume(&pci_dev->dev); 57 pm_runtime_resume(&pci_dev->dev);
55 if (pci_dev->subordinate)
56 pci_pme_wakeup_bus(pci_dev->subordinate);
57 } 58 }
59
60 if (pci_dev->subordinate)
61 pci_pme_wakeup_bus(pci_dev->subordinate);
58} 62}
59 63
60/** 64/**