• Z
    PCI: Disable PME during PCI scan · 49db1399
    Zhao Yakui 提交于
    If a device supports #PME and can generate PME events from D0, we may see
    superfluous events before a driver is loaded (drivers should only enable PME as
    needed), preventing suspend from working if the corresponding GPE was enabled.
    
    Likewise, if the ACPI device has the _PRW object, the _PSW/_DSW object will be
    called in order to disable the wakeup functionality. But when it is allowed to
    wake up the sleeping state, OSPM will enable it again.
    
    So we should disable PME in the course of scanning PCI devices and enable it
    again only when PME events are actually required to be generated from the
    requested PCI state (for example, D3_hot or D3_cold).  It is also safe to
    disable PME again when the PME is disabled for the PCI devices.
    Signed-off-by: NZhao Yakui <yakui.zhao@intel.com>
    Signed-off-by: NLi Shaohua <shaohua.li@intel.com>
    Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
    49db1399
probe.c 34.0 KB