Skip to content

Commit feba04e

Browse files
basuamdvinodkoul
authored andcommitted
dmaengine: ae4dma: Use the MSI count and its corresponding IRQ number
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: 90a30e2 ("dmaengine: ae4dma: Add AMD ae4dma controller driver") Signed-off-by: Basavaraj Natikar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent b87c29c commit feba04e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/dma/amd/ae4dma/ae4dma-pci.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ static int ae4_get_irqs(struct ae4_device *ae4)
4646

4747
} else {
4848
ae4_msix->msix_count = ret;
49-
for (i = 0; i < MAX_AE4_HW_QUEUES; i++)
50-
ae4->ae4_irq[i] = ae4_msix->msix_entry[i].vector;
49+
for (i = 0; i < ae4_msix->msix_count; i++)
50+
ae4->ae4_irq[i] = pci_irq_vector(pdev, i);
5151
}
5252

5353
return ret;

0 commit comments

Comments
 (0)