We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 975d812 commit ed572d2Copy full SHA for ed572d2
1 file changed
drivers/pci/controller/pcie-apple.c
@@ -704,11 +704,18 @@ static int apple_pcie_setup_port(struct apple_pcie *pcie,
704
705
link_stat = readl_relaxed(port->base + PORT_LINKSTS);
706
if (!(link_stat & PORT_LINKSTS_UP)) {
707
+ unsigned long timeout, left;
708
/* start link training */
709
writel_relaxed(PORT_LTSSMCTL_START, port->base + PORT_LTSSMCTL);
710
- if (!wait_for_completion_timeout(&pcie->event, link_up_timeout * HZ / 1000))
711
+ timeout = link_up_timeout * HZ / 1000;
712
+ left = wait_for_completion_timeout(&pcie->event, timeout);
713
+ if (!left)
714
dev_warn(pcie->dev, "%pOF link didn't come up\n", np);
715
+ else
716
+ dev_info(pcie->dev, "%pOF link up after %ldms\n", np,
717
+ (timeout - left) * 1000 / HZ);
718
+
719
}
720
721
return 0;
0 commit comments