]> www.infradead.org Git - users/jedix/linux-maple.git/commit
PCI: pciehp: Prioritize data-link event over presence detect
authorAshok Raj <ashok.raj@intel.com>
Sat, 19 Nov 2016 08:32:45 +0000 (00:32 -0800)
committerDhaval Giani <dhaval.giani@oracle.com>
Mon, 16 Jan 2017 21:10:22 +0000 (16:10 -0500)
commite873e89a1c204b2749e4a4b78345e56490b8a4ca
tree8041889e23ce476067ecd4966814c5c76bfb840a
parent5604ba1205200813cd3f717d578199363eca1f68
PCI: pciehp: Prioritize data-link event over presence detect

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.

Orabug: 25312751

Signed-off-by: Ashok Raj <ashok.raj@intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Keith Busch <keith.busch@intel.com>
Altered slightly for UEK4.1
(cherry picked from commit 385895fef6b5f4723e33d0e58251c45bc708132d)
Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
Signed-off-by: Dhaval Giani <dhaval.giani@oracle.com>
drivers/pci/hotplug/pciehp_hpc.c