We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b359748 commit 83f1139Copy full SHA for 83f1139
1 file changed
drivers/pci/controller/pcie-apple.c
@@ -726,11 +726,18 @@ static int apple_pcie_setup_port(struct apple_pcie *pcie,
726
727
link_stat = readl_relaxed(port->base + PORT_LINKSTS);
728
if (!(link_stat & PORT_LINKSTS_UP)) {
729
+ unsigned long timeout, left;
730
/* start link training */
731
writel_relaxed(PORT_LTSSMCTL_START, port->base + PORT_LTSSMCTL);
732
- if (!wait_for_completion_timeout(&pcie->event, link_up_timeout * HZ / 1000))
733
+ timeout = link_up_timeout * HZ / 1000;
734
+ left = wait_for_completion_timeout(&pcie->event, timeout);
735
+ if (!left)
736
dev_warn(pcie->dev, "%pOF link didn't come up\n", np);
737
+ else
738
+ dev_info(pcie->dev, "%pOF link up after %ldms\n", np,
739
+ (timeout - left) * 1000 / HZ);
740
+
741
}
742
743
return 0;
0 commit comments