Skip to content

Commit 695c062

Browse files
floatiousgregkh
authored andcommitted
PCI: tegra194: Fix broken tegra_pcie_ep_raise_msi_irq()
commit b640d42 upstream. The pci_epc_raise_irq() supplies a MSI or MSI-X interrupt number in range (1-N), as per the pci_epc_raise_irq() kdoc, where N is 32 for MSI. But tegra_pcie_ep_raise_msi_irq() incorrectly uses the interrupt number as the MSI vector. This causes wrong MSI vector to be triggered, leading to the failure of PCI endpoint Kselftest MSI_TEST test case. To fix this issue, convert the interrupt number to MSI vector. Fixes: c57247f ("PCI: tegra: Add support for PCIe endpoint mode in Tegra194") Signed-off-by: Niklas Cassel <cassel@kernel.org> Signed-off-by: Manivannan Sadhasivam <mani@kernel.org> Cc: stable@vger.kernel.org Link: https://patch.msgid.link/20250922140822.519796-6-cassel@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 7503861 commit 695c062

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1954,10 +1954,10 @@ static int tegra_pcie_ep_raise_intx_irq(struct tegra_pcie_dw *pcie, u16 irq)
19541954

19551955
static int tegra_pcie_ep_raise_msi_irq(struct tegra_pcie_dw *pcie, u16 irq)
19561956
{
1957-
if (unlikely(irq > 31))
1957+
if (unlikely(irq > 32))
19581958
return -EINVAL;
19591959

1960-
appl_writel(pcie, BIT(irq), APPL_MSI_CTRL_1);
1960+
appl_writel(pcie, BIT(irq - 1), APPL_MSI_CTRL_1);
19611961

19621962
return 0;
19631963
}

0 commit comments

Comments
 (0)