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