diff options
| author | Bjorn Helgaas <bhelgaas@google.com> | 2026-09-23 14:57:20 -0500 |
|---|---|---|
| committer | Bjorn Helgaas <bhelgaas@google.com> | 2026-10-01 11:41:48 -0500 |
| commit | 42b5b17cf4bb6154028b31f12db94ecb9069fd74 (patch) | |
| tree | ed38795bcf2bda9e617eb35efebfe0b38185a81b /tools/lib/python | |
| parent | cee9395acd8043be0644b25c34bfa86623f2b935 (diff) | |
| download | linux-next-42b5b17cf4bb6154028b31f12db94ecb9069fd74.tar.gz linux-next-42b5b17cf4bb6154028b31f12db94ecb9069fd74.zip | |
PCI: tegra264: Fix Link Capabilities register offset
The PCI Express Capability begins at 0x48. Link Capabilities is a 32-bit
register at offset 0xc, and Link Status is a 16-bit register at offset
0x12:
Link Capabilities is at 0x48 + 0xc = 0x54
Link Status is at 0x48 + 0x12 = 0x5a
Previously the driver read Link Capabilities with a 16-bit read from
XTL_RC_PCIE_CFG_LINK_CAPS (0x56), which incorrectly read just the upper
half of the register. When a hotplug-capable port has no link during
probe, tegra264_pcie_icc_set() consequently derives the maximum speed and
width from unrelated bits and requests the wrong interconnect bandwidth.
Correct the Link Capabilities usage by adding a XTL_RC_PCIE_CAP definition
for the base of the PCIe Capability, using the existing PCI_EXP_LNKCAP
(0xc) and PCI_EXP_LNKSTA (0x12) offsets so they're easily searchable, and
reading the entire 32 bits of Link Capabilities.
Fixes: 01c3c27a0ef6 ("PCI: tegra264: Add Tegra264 support")
Based-on-patch-by: Linmao Li <lilinmao@kylinos.cn>
Link: https://lore.kernel.org/20260827093919.2825467-1-lilinmao@kylinos.cn
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Tested-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Link: https://patch.msgid.link/20260923195719.1933175-2-bhelgaas@google.com
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions
