We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5be5024 commit 8813fe7Copy full SHA for 8813fe7
1 file changed
drivers/pci/controller/pcie-apple.c
@@ -739,11 +739,18 @@ static int apple_pcie_setup_port(struct apple_pcie *pcie,
739
740
link_stat = readl_relaxed(port->base + PORT_LINKSTS);
741
if (!(link_stat & PORT_LINKSTS_UP)) {
742
+ unsigned long timeout, left;
743
/* start link training */
744
writel_relaxed(PORT_LTSSMCTL_START, port->base + PORT_LTSSMCTL);
745
- if (!wait_for_completion_timeout(&pcie->event, link_up_timeout * HZ / 1000))
746
+ timeout = link_up_timeout * HZ / 1000;
747
+ left = wait_for_completion_timeout(&pcie->event, timeout);
748
+ if (!left)
749
dev_warn(pcie->dev, "%pOF link didn't come up\n", np);
750
+ else
751
+ dev_info(pcie->dev, "%pOF link up after %ldms\n", np,
752
+ (timeout - left) * 1000 / HZ);
753
+
754
}
755
756
if (pcie->hw->port_refclk)
0 commit comments