• Ashok Raj's avatar
    PCI: pciehp: Prioritize data-link event over presence detect · 385895fe
    Ashok Raj authored
    If Slot Status indicates changes in both Data Link Layer Status and
    Presence Detect, prioritize the Link status change.
    
    When both events are observed, pciehp currently relies on the Slot Status
    Presence Detect State (PDS) to agree with the Link Status Data Link Layer
    Active status.  The Presence Detect State, however, may be set to 1 through
    out-of-band presence detect even if the link is down, which creates
    conflicting events.
    
    Since the Link Status accurately reflects the reachability of the
    downstream bus, the Link Status event should take precedence over a
    Presence Detect event.  Skip checking the PDC status if we handled a link
    event in the same handler.
    Signed-off-by: default avatarAshok Raj <ashok.raj@intel.com>
    Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
    Reviewed-by: default avatarKeith Busch <keith.busch@intel.com>
    385895fe
pciehp_hpc.c 23.5 KB