mbox series

[0/2] PCI: Add support for handling link down event from host bridge drivers

Message ID 20250221172309.120009-1-manivannan.sadhasivam@linaro.org (mailing list archive)
Headers show
Series PCI: Add support for handling link down event from host bridge drivers | expand

Message

Manivannan Sadhasivam Feb. 21, 2025, 5:23 p.m. UTC
Hi,

This series adds support for handling the PCIe link down event from the host
bridge drivers. This series moves the link down event handling to the PCI core
(atleast the generic bits) to prevent the host bridge drivers from retraining
the link on the back of the PCI core as done in [1].

Also, the newly introduced callback 'pci_ops::retrain_link()' could be extended
to recover the bus in the case of errors in the future.

I've implemented the 'pci_ops::retrain_link()' callback in pcie-qcom driver as a
reference.

Testing
=======

This series is tested on Qcom RB5 and SA8775p Ride boards.

[1] https://lore.kernel.org/linux-pci/20241112064813.751736-1-jpatel2@marvell.com

Manivannan Sadhasivam (2):
  PCI: Add pci_host_bridge_handle_link_down() API to handle the PCI link
    down event
  PCI: qcom: Add support for retraining the link due to link down event

 drivers/pci/controller/dwc/pcie-qcom.c | 90 +++++++++++++++++++++++++-
 drivers/pci/probe.c                    | 34 ++++++++++
 include/linux/pci.h                    |  2 +
 3 files changed, 124 insertions(+), 2 deletions(-)