mtk_pcie_retrain(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ mtk_pcie_retrain(9) ✨

okay so bestie, we're in the Kernel API Manual, and this page is literally mtk_pcie_retrain(9) β€” the little β€œretrain the root bridge link if needed” situation πŸ’…


πŸŽ€ NAME πŸŽ€

mtk_pcie_retrain β€” retrain the root bridge link if needed ✨


🌸 SYNOPSIS 🌸

int mtk_pcie_retrain (struct device *dev , struct pci_host_bridge *host
);

πŸ’– ARGUMENTS πŸ’–

  • dev β€” the device, and it’s used for logging 🫢
  • host β€” the host bridge which contains the link πŸ‘‘

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here’s the tea, bestie: due to what is likely a hardware bug, some devices (notably EcoNet) start up as Gen1, and they must be retrained once after initial configuration in order to reach Gen2. iconic but also annoying 😭

These devices always self-identify as Gen2 capable, but sometimes the PHY is only capable of Gen1 operation, and sometimes the PCIe card (e.g. wifi) is only Gen1 capable. so yeah, that’s the vibe πŸ’€

Therefore it is most convenient to retrain every port after startup. periodt. ✨


πŸ”₯ SEE ALSO πŸ”₯

  • Kernel file ./drivers/pci/controller/pcie-mediatek.c enum
  • mtk_pcie_quirks(9)
  • struct mtk_pcie_soc(9)
  • struct mtk_pcie_port(9)
  • struct mtk_pcie(9)

source/version: ./drivers/pci/controller Β· date: October 2026 β€” bye bestie, go retrain that link πŸ’…πŸ’–

πŸ“¦ where this page comes from