• Rafael J. Wysocki's avatar
    PCI / PM: Drop pme_interrupt flag from struct pci_dev · 8370c2dc
    Rafael J. Wysocki authored
    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: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    Reviewed-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
    Acked-by: default avatarBjorn Helgaas <bhelgaas@google.com>
    8370c2dc
device_pm.c 31.2 KB