Thread (8 messages) 8 messages, 4 authors, 2025-07-15

Re: [PATCH v5 1/4] PCI/ERR: Add support for resetting the Root Ports in a platform specific way

From: Manivannan Sadhasivam <mani@kernel.org>
Date: 2025-07-15 09:20:08
Also in: linux-arm-kernel, linux-arm-msm, linux-pci, linux-rockchip, lkml

On Tue, Jul 15, 2025 at 10:16:27AM GMT, Lukas Wunner wrote:
On Tue, Jul 15, 2025 at 01:29:18PM +0530, Manivannan Sadhasivam wrote:
quoted
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -4964,7 +4964,19 @@ void pci_reset_secondary_bus(struct pci_dev *dev)
 
 void __weak pcibios_reset_secondary_bus(struct pci_dev *dev)
 {
+	struct pci_host_bridge *host = pci_find_host_bridge(dev->bus);
+	int ret;
+
+	if (host->reset_root_port) {
+		ret = host->reset_root_port(host, dev);
+		if (ret)
+			pci_err(dev, "Failed to reset Root Port: %d\n", ret);
+
+		return;
+	}
+
There used to be a pci_is_root_bus() check here:

https://lore.kernel.org/r/20250524185304.26698-2-manivannan.sadhasivam@linaro.org/ (local)
Right. I forgot to include that series, but somehow managed to remember the
s/slot/root_port change.

Will incorporate in next revision, thanks!

- Mani

-- 
மணிவண்ணன் சதாசிவம்
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help