diff options
| author | Ilpo Järvinen <[email protected]> | 2025-04-22 11:55:47 +0000 |
|---|---|---|
| committer | Krzysztof Wilczyński <[email protected]> | 2025-05-15 08:38:40 +0000 |
| commit | 2389d8dc38fee18176c49e9c4804f5ecc55807fa (patch) | |
| tree | b1c0ce10bfc670750b3aa1360269762aea8e14c3 /drivers/pci/controller/dwc/pcie-qcom-common.c | |
| parent | Linux 6.15-rc1 (diff) | |
| download | kernel-2389d8dc38fee18176c49e9c4804f5ecc55807fa.tar.gz kernel-2389d8dc38fee18176c49e9c4804f5ecc55807fa.zip | |
PCI/bwctrl: Replace lbms_count with PCI_LINK_LBMS_SEEN flag
PCIe BW controller counted LBMS assertions for the purposes of the Target
Speed quirk (pcie_failed_link_retrain()). It was also a plan to expose the
LBMS count through sysfs to allow better diagnosing link related issues.
Lukas Wunner suggested, however, that adding a trace event would be better
for diagnostics purposes, leaving only pcie_failed_link_retrain() as a user
of the lbms_count.
The logic in pcie_failed_link_retrain() does not require keeping count of
LBMS assertions, so replace lbms_count with a simple flag in pci_dev's
priv_flags. The reduced complexity allows removing pcie_bwctrl_lbms_rwsem.
Since pcie_failed_link_retrain() runs before bwctrl is probed during boot,
the LBMS in Link Status register still has to be checked by the quirk.
The priv_flags numbering is not continuous because hotplug code added a few
flags to fill numbers 4-5 (hotplug and bwctrl changes are routed through in
different branches).
Suggested-by: Lukas Wunner <[email protected]>
Signed-off-by: Ilpo Järvinen <[email protected]>
[bhelgaas: commit log]
Signed-off-by: Bjorn Helgaas <[email protected]>
[kwilczynski: squashed a fix to resolve build failures from
https://lore.kernel.org/all/[email protected]]
Signed-off-by: Krzysztof Wilczyński <[email protected]>
Reviewed-by: Lukas Wunner <[email protected]>
Link: https://patch.msgid.link/[email protected]
Diffstat (limited to 'drivers/pci/controller/dwc/pcie-qcom-common.c')
0 files changed, 0 insertions, 0 deletions
