Repository navigation
PCI: apple: t6050: write the gen5 shadow tunables into the 32 GT/s bank - #2270
RyanTheTide wants to merge 1 commit into
Conversation
apple_pcie_t6050_port_configure() selects a rate's shadow bank in
GEN3_RELATED.RATE_SHADOW_SEL (bits 25:24) before it writes that rate's
tunables. The table it used, { 0, BIT(24), 0 }, selected bank 0 again
for the gen5 tunables. They overwrote the gen3 values, and the link
trains at 8 GT/s, so the bank in use ended up with gen5's values.
The field is DesignWare's: 0 selects the 8 GT/s bank, 1 the 16 GT/s
bank, 2 the 32 GT/s bank. pcie-qcom-common.c uses the same encoding
(speed - PCIE_SPEED_8_0GT). The J716s boot loader trace in the report
shows gen3 = 0, gen4 = 1, gen5 = 2, with the field left at 2.
Write the loop index into the field with FIELD_PREP(), which gives 0, 1
and 2 for the three tunable lists. The field is left at 2 as the boot
loader leaves it, and no other code here depends on its value.
Every T6050 board with these tunables in its DT is affected (J714s,
K116s). Nothing else uses this function.
Fixes: 847c749 ("PCI: apple: Add the T6050 port reset, enable, configure and train sequences")
Reported-by: RINNECODER <[email protected]>
Closes: #1379
Signed-off-by: Ryan Murray <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Blockers: 1.
The fix itself is correct.
Even so, this changes the equalisation values on the only link the N1 uses, on every T6050 board with these tunables, and nobody has run it yet. HW row: J714s or K116s, a kernel from this head, cold boot and one s2idle.
Assisted-by: LLM (Claude:Opus 5.5) |
|
Replaced by #2794: the same changes with the commit trailers fixed, on the current integration/aurora. |
Fixes #1379.
apple_pcie_t6050_port_configure()picks each rate's shadow bank inGEN3_RELATED.RATE_SHADOW_SEL(bits 25:24) before it writes that rate's tunables. The table it used,{ 0, BIT(24), 0 }, selected bank 0 again forapple,pcie-rc-gen5-shadow-tunables. The gen5 values overwrote the gen3 ones, and since the link trains at 8 GT/s, the bank in use ran with gen5's values.Change. The loop writes
FIELD_PREP(RC_T6050_RATE_SHADOW_SEL, i), so the gen3, gen4 and gen5 lists go to banks 0, 1 and 2. That is DesignWare's encoding:pcie-qcom-common.cwritesspeed - PCIE_SPEED_8_0GTinto the same field. It also matches the J716s boot-loader trace cited in the issue (gen3 = 0, gen4 = 1, gen5 = 2). The field is left at 2, as the boot loader leaves it. Nothing else in the driver reads or depends on the field.Reach. Every T6050 board whose DT carries the shadow tunables (J714s, K116s) runs this function at port configure, adopt and restart. No other SoC uses it.
Evidence.
--strict: no code findings (only the no-tree commit-id warning and the trailer form).apple_pcie_t6050_port_configure(), the third select now writes 2 (orr #0x2000000after the field clear). Before, it wrote 0 again.lspci -vv -s <N1 root port>LnkSta anddmesg | grep -iE 'aer|pcie'before and after, plus a few minutes of Wi-Fi ping and throughput. The link should still train at 8 GT/s x1, with no new AER errors.Reported by @RINNECODER in #1379, including the fix.
Assisted-by: LLM (Claude:Opus 5.5)