[PATCH v2 0/2] PCI: altera: Fix IRQ cleanup on probe failure
From: Mahesh Vaidya
Date: Thu Apr 30 2026 - 16:44:02 EST
This series addresses review feedback from v1 of the Altera PCIe probe
failure cleanup fix.
Patch 1 removes irq_dispose_mapping(pcie->irq) from the IRQ teardown
path. pcie->irq is the parent IRQ returned by platform_get_irq(), not an
IRQ created by the Altera INTx irq_domain, so the driver should detach
the chained handler but not dispose the parent IRQ mapping.
Patch 2 fixes the original probe failure issue. The chained handler is
now installed only after the INTx domain is created, controller interrupts
are disabled during teardown, and the IRQ setup is torn down if
pci_host_probe() fails.
Tested on Agilex 7 and Stratix 10:
- Boot and fio read/write through a PCIe endpoint.
- Probe-failure cleanup path by injecting a failure before
pci_host_probe().
Changes since v1:
- Removed irq_dispose_mapping(pcie->irq), since pcie->irq is the parent
IRQ returned by platform_get_irq().
- Added controller interrupt disable helper.
- Disabled controller interrupts before tearing down the chained handler
and INTx domain.
- Reused the teardown path when pci_host_probe() fails.
v1:
https://lore.kernel.org/linux-pci/20260427175302.570671-1-mahesh.vaidya@xxxxxxxxxx/
Mahesh Vaidya (2):
PCI: altera: Do not dispose parent IRQ mapping
PCI: altera: Fix resource leaks on probe failure
drivers/pci/controller/pcie-altera.c | 36 +++++++++++++++++++++++++---
1 file changed, 33 insertions(+), 3 deletions(-)
base-commit: 4224e91fea5695a89843b4c38283016616946307
--
2.34.1