Skip to content

Commit 0aaaee0

Browse files
Manikanta Maddireddygregkh
authored andcommitted
PCI: tegra194: Disable PERST# IRQ only in Endpoint mode
[ Upstream commit 40658a3 ] The PERST# GPIO interrupt is only registered when the controller is operating in Endpoint mode. In Root Port mode, the PERST# GPIO is configured as an output to control downstream devices, and no interrupt is registered for it. Currently, tegra_pcie_dw_stop_link() unconditionally calls disable_irq() on pex_rst_irq, which causes issues in Root Port mode where this IRQ is not registered. Fix this by only disabling the PERST# IRQ when operating in Endpoint mode, where the interrupt is actually registered and used to detect PERST# assertion/deassertion from the host. Fixes: c57247f ("PCI: tegra: Add support for PCIe endpoint mode in Tegra194") 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> Reviewed-by: Vidya Sagar <vidyas@nvidia.com> Link: https://patch.msgid.link/20260324190755.1094879-6-mmaddireddy@nvidia.com Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent a9f64e1 commit 0aaaee0

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/pci/controller/dwc/pcie-tegra194.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1025,7 +1025,8 @@ static void tegra_pcie_dw_stop_link(struct dw_pcie *pci)
10251025
{
10261026
struct tegra_pcie_dw *pcie = to_tegra_pcie(pci);
10271027

1028-
disable_irq(pcie->pex_rst_irq);
1028+
if (pcie->of_data->mode == DW_PCIE_EP_TYPE)
1029+
disable_irq(pcie->pex_rst_irq);
10291030
}
10301031

10311032
static const struct dw_pcie_ops tegra_dw_pcie_ops = {

0 commit comments

Comments
 (0)