Skip to content

PCI: pciehp: Do not turn off slot if presence comes up after link

Stuart Hayes linux-pci lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3PCI: pciehp: Add support for disabling in-band presencedrivers/pci/hotplug/pciehp.h drivers/pci/hotplug/pciehp_hpc.c include/uapi/linux/pci_regs.h+11 -10 replies
2/3PCI: pciehp: Wait for PDS if in-band presence is disableddrivers/pci/hotplug/pciehp_hpc.c+22 -00 replies
3/3PCI: pciehp: Add dmi table for in-band presence disableddrivers/pci/hotplug/pciehp_hpc.c+14 -02 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] PCI: pciehp: Do not turn off slot if presence comes up after link

In older PCIe specs, PDS (presence detect) would come up when the "in-band" presence detect pin connected, and would be up before DLLLA (link active).

In PCIe 4.0 (as an ECN) and in PCIe 5.0, there is a new bit to show if in-band presence detection can be disabled for the slot, and another bit that disables it--and a recommendation that it should be disabled if it can be. In addition, certain OEMs disable in-band presence detection without implementing these bits.

This means it is possible to get a "card present" interrupt after the link is up and the driver is loaded. This causes an erroneous removal of the device driver, followed by an immediate re-probing.

This patch set defines these new bits, uses them to disable in-band presence detection if it can be, waits for PDS to go up if in-band presence detection is disabled, and adds a DMI table that will let us know if we should assume in-band presence is disabled on a system.

This patch set is based on a patch set [1] submitted many months ago by Alexandru Gagniuc, who is no longer working on it.

[1] https://patchwork.kernel.org/cover/10909167/
[v3,0/4] PCI: pciehp: Do not turn off slot if presence comes up after link

Stuart Hayes (3):
PCI: pciehp: Add support for disabling in-band presence
PCI: pciehp: Wait for PDS when in-band presence is disabled
PCI: pciehp: Add dmi table for systems with in-band presence disabled

 drivers/pci/hotplug/pciehp.h     |  1 +
 drivers/pci/hotplug/pciehp_hpc.c | 45 +++++++++++++++++++++++++++++++-
 include/uapi/linux/pci_regs.h    |  2 ++
 3 files changed, 47 insertions(+), 1 deletion(-)
Signature · 1 line
2.18.1