]> git.ipfire.org Git - thirdparty/linux.git/commit
PCI: tegra194: Increase LTSSM poll time on surprise link down
authorManikanta Maddireddy <mmaddireddy@nvidia.com>
Tue, 24 Mar 2026 19:07:43 +0000 (00:37 +0530)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 8 Apr 2026 20:33:52 +0000 (15:33 -0500)
commit74dd8efe4d6cead433162147333af989a568aac7
treee5391a0fab66ab4ee5b15e3e677e5b08a8827e28
parentadaffed907f14f954096555665ad6af2ae724d83
PCI: tegra194: Increase LTSSM poll time on surprise link down

On surprise link down, LTSSM state transits from L0 -> Recovery.RcvrLock ->
Recovery.RcvrSpeed -> Gen1 Recovery.RcvrLock -> Detect. Recovery.RcvrLock
and Recovery.RcvrSpeed transit times are 24 ms and 48 ms respectively, so
the total time from L0 to Detect is ~96 ms. Increase the poll timeout to
120 ms to account for this.

While at it, add LTSSM state defines for Detect-related states and use them
in the poll condition. Use readl_poll_timeout() instead of
readl_poll_timeout_atomic() in tegra_pcie_dw_pme_turnoff() since that path
runs in non-atomic context.

Fixes: 56e15a238d92 ("PCI: tegra: Add Tegra194 PCIe support")
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Signed-off-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Link: https://patch.msgid.link/20260324190755.1094879-3-mmaddireddy@nvidia.com
drivers/pci/controller/dwc/pcie-tegra194.c