summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBasavaraj Natikar <Basavaraj.Natikar@amd.com>2025-02-03 21:55:10 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-04-10 14:44:31 +0200
commit2f22413a27eb487c786096aec602eecd391dd7d9 (patch)
tree5c887ca2b35daf3a20ede9cf6b996b81c3fead60
parentf3834d2d68749e4760c27325149765930ad876fd (diff)
dmaengine: ae4dma: Use the MSI count and its corresponding IRQ number
[ Upstream commit feba04e6fdf4daccc83fc09d499a3e32c178edb4 ] Instead of using the defined maximum hardware queue, which can lead to incorrect values if the counts mismatch, use the exact supported MSI count and its corresponding IRQ number. Fixes: 90a30e268d9b ("dmaengine: ae4dma: Add AMD ae4dma controller driver") Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com> Link: https://lore.kernel.org/r/20250203162511.911946-3-Basavaraj.Natikar@amd.com Signed-off-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/dma/amd/ae4dma/ae4dma-pci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/dma/amd/ae4dma/ae4dma-pci.c b/drivers/dma/amd/ae4dma/ae4dma-pci.c
index aad0dc4294a3..587c5a10c1a8 100644
--- a/drivers/dma/amd/ae4dma/ae4dma-pci.c
+++ b/drivers/dma/amd/ae4dma/ae4dma-pci.c
@@ -46,8 +46,8 @@ static int ae4_get_irqs(struct ae4_device *ae4)
} else {
ae4_msix->msix_count = ret;
- for (i = 0; i < MAX_AE4_HW_QUEUES; i++)
- ae4->ae4_irq[i] = ae4_msix->msix_entry[i].vector;
+ for (i = 0; i < ae4_msix->msix_count; i++)
+ ae4->ae4_irq[i] = pci_irq_vector(pdev, i);
}
return ret;