Skip to contentSkip to conversation

PCI: dwc: do not ignore link errors

PATCH Superseded Christian Gmeiner 1 participant 1 message Jul 21, 2021

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PCI: dwc: do not ignore link errors

This fixes long boot delays of about 10 seconds.

I am working on a device powered by an TI am65 SoC where we have a PCIe expansion slot. If there is no PCIe device connected I see boot delays caused by pci_host_probe(..).

---
 drivers/pci/controller/dwc/pcie-designware-host.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/pci/controller/dwc/pcie-designware-host.c +3 -2
index a608ae1fad57..82ba429246f8 100644
@@ -408,8 +408,9 @@ int dw_pcie_host_init(struct pcie_port *pp)
 			goto err_free_msi;
 	}
 
-	/* Ignore errors, the link may come up later */
-	dw_pcie_wait_for_link(pci);
+	int ret = dw_pcie_wait_for_link(pci);
+	if (ret)
+		goto err_free_msi;
 
 	bridge->sysdata = pp;
 
Signature · 1 line
2.31.1