[PATCH v2 7/8] PCI: mediatek-gen3: Add 100 ms delay after link training
Hans Zhang
18255117159 at 163.com
Wed May 6 08:23:45 PDT 2026
The MediaTek Gen3 PCIe host driver lacks the required 100 ms delay after
link training completes for speeds > 5.0 GT/s, as specified in PCIe r6.0
sec 6.6.1.
The driver already stores max_link_speed (from the device tree). After
mtk_pcie_startup_port() successfully brings up the link, call
pcie_wait_after_link_train() to comply with the specification.
Signed-off-by: Hans Zhang <18255117159 at 163.com>
---
drivers/pci/controller/pcie-mediatek-gen3.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/pci/controller/pcie-mediatek-gen3.c b/drivers/pci/controller/pcie-mediatek-gen3.c
index b0accd828589..7c5f2ba7157b 100644
--- a/drivers/pci/controller/pcie-mediatek-gen3.c
+++ b/drivers/pci/controller/pcie-mediatek-gen3.c
@@ -570,6 +570,8 @@ static int mtk_pcie_startup_port(struct mtk_gen3_pcie *pcie)
goto err_power_down_device;
}
+ pcie_wait_after_link_train(pcie->max_link_speed);
+
return 0;
err_power_down_device:
--
2.34.1
More information about the Linux-mediatek
mailing list