Linux PCI subsystem development
 help / color / mirror / Atom feed
* [PATCH v2 0/2] PCI: altera: Fix IRQ cleanup on probe failure
@ 2026-04-30 20:43 Mahesh Vaidya
  2026-04-30 20:43 ` [PATCH v2 1/2] PCI: altera: Do not dispose parent IRQ mapping Mahesh Vaidya
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Mahesh Vaidya @ 2026-04-30 20:43 UTC (permalink / raw)
  To: joyce.ooi, lpieralisi, kwilczynski, mani, robh, bhelgaas,
	ley.foon.tan, dinguyen
  Cc: linux-pci, linux-kernel, subhransu.sekhar.prusty, preetam.narayan,
	cheryl.bansal, stable, Mahesh Vaidya

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@altera.com/

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-09-04 11:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-30 20:43 [PATCH v2 0/2] PCI: altera: Fix IRQ cleanup on probe failure Mahesh Vaidya
2026-04-30 20:43 ` [PATCH v2 1/2] PCI: altera: Do not dispose parent IRQ mapping Mahesh Vaidya
2026-04-30 20:43 ` [PATCH v2 2/2] PCI: altera: Fix resource leaks on probe failure Mahesh Vaidya
2026-09-02 17:56   ` Bjorn Helgaas
2026-09-04 11:11     ` Dinh Nguyen
2026-05-15 17:35 ` [PATCH v2 0/2] PCI: altera: Fix IRQ cleanup " Manivannan Sadhasivam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox