ENUM MTK_PCIE_QUIRKS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

enum mtk_pcie_quirks β€” MTK PCIe quirks, aka the little list of "hey this silicon is a lil special" flags πŸ’…

okay so real talk, this is from the Kernel API Manual, and it's basically a cheat sheet of workarounds for MediaTek PCIe host controllers that don't quite behave like the textbook says they should 🫢


🌸 SYNOPSIS 🌸

enum mtk_pcie_quirks {
    MTK_PCIE_FIX_CLASS_ID ,
    MTK_PCIE_FIX_DEVICE_ID ,
    MTK_PCIE_NO_MSI ,
    MTK_PCIE_SKIP_RSTB ,
    MTK_PCIE_RETRAIN

};

literally just an enum, bestie, five constants, no cap πŸŽ€


🌈 Constants 🌈

okay so here's the vibe check on each one πŸ‘‘

  • MTK_PCIE_FIX_CLASS_ID β€” the host's class ID needed to be fixed. yeah. it's wrong. we're fixing it. moving on 😭
  • MTK_PCIE_FIX_DEVICE_ID β€” same energy, but for the host's device ID β€” it needed to be fixed too πŸ”§
  • MTK_PCIE_NO_MSI β€” the bridge has no MSI support and relies on an external block. so like, don't come for it about MSI, it's doing its best πŸ™ˆ
  • MTK_PCIE_SKIP_RSTB β€” skip calling RSTB bits on PCIe probe. we just… don't touch those bits. iconic behavior honestly ⭐
  • MTK_PCIE_RETRAIN β€” retrain the link to the bridge after startup, because some Gen2-capable devices start as Gen1. they wake up in the wrong era and we gotta gently nudge them into the present πŸ¦‹

πŸŽ€ SEE ALSO πŸŽ€

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

k that's the whole page, go read the source if you want the lore πŸ’€

and that's a wrap, bestie πŸ’– this one's filed under ./drivers/pci/controller, dated October 2026 β€” the enum mtk_pcie_quirks(9) era. slay 🌟

πŸ“¦ where this page comes from