]> git.baikalelectronics.ru Git - kernel.git/commit
PCI / PM: Drop pme_interrupt flag from struct pci_dev
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 23 Jun 2017 23:56:13 +0000 (01:56 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 27 Jun 2017 23:52:38 +0000 (01:52 +0200)
commit4f4de42ad984ff0d7a16115cf38beb8246b524ce
treeee4c1a4d35ef7ed39107e61a8846f1db2405425f
parentddc2715ae5f2b7804dd2bfee952143f382ad40e0
PCI / PM: Drop pme_interrupt flag from struct pci_dev

The pme_interrupt flag in struct pci_dev is set when PMEs generated
by the device are going to be signaled via root port PME interrupts.

Ironically enough, that information is only used by the code setting
up device wakeup through ACPI which returns as soon as it sees the
pme_interrupt flag set while setting up "remote runtime wakeup".
That is questionable, however, because in theory there may be PCIe
devices using out-of-band PME signaling under root ports handled
by the native PME code or devices requiring wakeup power setup to be
carried out by AML.  For such devices, ACPI wakeup should be invoked
regardless of whether or not native PME signaling is used in general.

For this reason, drop the pme_interrupt flag and rework the code
using it which then allows the ACPI-based device wakeup handling
in PCI to be consolidated to use one code path for both "runtime
remote wakeup" and system wakeup (from sleep states).

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>
drivers/acpi/device_pm.c
drivers/pci/pci-acpi.c
drivers/pci/pcie/pme.c
include/acpi/acpi_bus.h
include/linux/pci.h