Linux-PCI Archive mirror
 help / color / mirror / Atom feed
From: Mahesh Vaidya <mahesh.vaidya@altera.com>
To: joyce.ooi@intel.com, lpieralisi@kernel.org,
	kwilczynski@kernel.org, mani@kernel.org, robh@kernel.org,
	bhelgaas@google.com, ley.foon.tan@intel.com, dinguyen@kernel.org
Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	subhransu.sekhar.prusty@altera.com, preetam.narayan@altera.com,
	cheryl.bansal@altera.com, stable@vger.kernel.org,
	Mahesh Vaidya <mahesh.vaidya@altera.com>
Subject: [PATCH v2 0/2] PCI: altera: Fix IRQ cleanup on probe failure
Date: Thu, 30 Apr 2026 13:43:28 -0700	[thread overview]
Message-ID: <20260430204330.3121003-1-mahesh.vaidya@altera.com> (raw)

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


             reply	other threads:[~2026-04-30 20:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-30 20:43 Mahesh Vaidya [this message]
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-05-15 17:35 ` [PATCH v2 0/2] PCI: altera: Fix IRQ cleanup " Manivannan Sadhasivam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260430204330.3121003-1-mahesh.vaidya@altera.com \
    --to=mahesh.vaidya@altera.com \
    --cc=bhelgaas@google.com \
    --cc=cheryl.bansal@altera.com \
    --cc=dinguyen@kernel.org \
    --cc=joyce.ooi@intel.com \
    --cc=kwilczynski@kernel.org \
    --cc=ley.foon.tan@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=mani@kernel.org \
    --cc=preetam.narayan@altera.com \
    --cc=robh@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=subhransu.sekhar.prusty@altera.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).