• Rafael J. Wysocki's avatar
    PCI / PM: Restore PME Enable if skipping wakeup setup · dc15e71e
    Rafael J. Wysocki authored
    The wakeup_prepared PCI device flag is used for preventing subsequent
    changes of PCI device wakeup settings in the same way (e.g. enabling
    device wakeup twice in a row).
    
    However, in some cases PME Enable may be updated by things like PCI
    configuration space restoration in the meantime and it may need to be
    set again even though the rest of the settings need not change, so
    modify __pci_enable_wake() to do that when it is about to return
    early.
    
    Also, it is reasonable to expect that __pci_enable_wake() will always
    clear PME Status when invoked to disable device wakeup, so make it do
    so even if it is going to return early then.
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    Acked-by: default avatarBjorn Helgaas <bhelgaas@google.com>
    dc15e71e
pci.c 143 KB