diff options
author | Hector Martin <marcan@marcan.st> | 2022-03-09 22:21:17 +0300 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2022-03-10 12:49:03 +0300 |
commit | 89eb1681b73ff584c5678f7185a2d8e3070e9b78 (patch) | |
tree | 3b513d215d35fe7c810b6379e2536a7b32c1e542 /drivers/pci | |
parent | dfd42facf1e4ada021b939b4e19c935dcdd55566 (diff) | |
download | linux-89eb1681b73ff584c5678f7185a2d8e3070e9b78.tar.xz |
PCI: apple: Change MSI handling to handle 4-cell AIC fwspec form
AIC2 changes the IRQ fwspec to add a cell. Always use the second-to-last
cell for the MSI handling, so it will work for both AIC1 and AIC2 devices.
Signed-off-by: Hector Martin <marcan@marcan.st>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220309192123.152028-2-marcan@marcan.st
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/controller/pcie-apple.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/controller/pcie-apple.c b/drivers/pci/controller/pcie-apple.c index 854d95163112..a2c3c207a04b 100644 --- a/drivers/pci/controller/pcie-apple.c +++ b/drivers/pci/controller/pcie-apple.c @@ -219,7 +219,7 @@ static int apple_msi_domain_alloc(struct irq_domain *domain, unsigned int virq, if (hwirq < 0) return -ENOSPC; - fwspec.param[1] += hwirq; + fwspec.param[fwspec.param_count - 2] += hwirq; ret = irq_domain_alloc_irqs_parent(domain, virq, nr_irqs, &fwspec); if (ret) |