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