Skip to content

Commit b640d42

Browse files
floatiousMani-Sadhasivam
authored andcommitted
PCI: tegra194: Fix broken tegra_pcie_ep_raise_msi_irq()
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
1 parent 85afa9e commit b640d42

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

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

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

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

1961-
appl_writel(pcie, BIT(irq), APPL_MSI_CTRL_1);
1961+
appl_writel(pcie, BIT(irq - 1), APPL_MSI_CTRL_1);
19621962

19631963
return 0;
19641964
}

0 commit comments

Comments
 (0)