PCI: pnv_php: Work around switches with broken presence detection
authorTimothy Pearson <tpearson@raptorengineering.com>
Tue, 15 Jul 2025 21:36:55 +0000 (16:36 -0500)
committerMadhavan Srinivasan <maddy@linux.ibm.com>
Sat, 26 Jul 2025 07:37:42 +0000 (13:07 +0530)
commit80f9fc2362797538ebd4fd70a1dfa838cc2c2cdb
treea1d1a06b798debc64cdcc52c9b5c7527abfbb7bb
parent4668619092554e1b95c9a5ac2941ca47ba6d548a
PCI: pnv_php: Work around switches with broken presence detection

The Microsemi Switchtec PM8533 PFX 48xG3 [11f8:8533] PCIe switch system
was observed to incorrectly assert the Presence Detect Set bit in its
capabilities when tested on a Raptor Computing Systems Blackbird system,
resulting in the hot insert path never attempting a rescan of the bus
and any downstream devices not being re-detected.

Work around this by additionally checking whether the PCIe data link is
active or not when performing presence detection on downstream switches'
ports, similar to the pciehp_hpc.c driver.

Signed-off-by: Shawn Anastasio <sanastasio@raptorengineering.com>
Signed-off-by: Timothy Pearson <tpearson@raptorengineering.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/505981576.1359853.1752615415117.JavaMail.zimbra@raptorengineeringinc.com
drivers/pci/hotplug/pnv_php.c