From: Bjorn Helgaas <helgaas@kernel.org>
To: Stefan Roese <stefan.roese@mailbox.org>
Cc: linux-pci@vger.kernel.org,
Sean Anderson <sean.anderson@linux.dev>,
Manivannan Sadhasivam <mani@kernel.org>,
Ravi Kumar Bandi <ravib@amazon.com>,
Thippeswamy Havalige <thippeswamy.havalige@amd.com>,
Michal Simek <michal.simek@amd.com>,
Bjorn Helgaas <bhelgaas@google.com>
Subject: Re: [PATCH v2] PCI: pcie-xilinx-dma-pl: Fix off-by-one INTx IRQ handling
Date: Tue, 21 Oct 2025 10:53:47 -0500 [thread overview]
Message-ID: <20251021155347.GA1191808@bhelgaas> (raw)
In-Reply-To: <20251021154322.973640-1-stefan.roese@mailbox.org>
On Tue, Oct 21, 2025 at 05:43:22PM +0200, Stefan Roese wrote:
> While testing with NVMe drives connected to the Versal QDMA PL PCIe RP
> on our platform I noticed that with MSI disabled (e.g. via pci=nomsi)
> the NVMe interrupts are not delivered to the host CPU resulting in
> timeouts while probing.
>
> Debugging has shown, that the hwirq numbers passed to this device driver
> (1...4, 1=INTA etc) need to get adjusted to match the numbers in the
> controller registers bits (0...3).
>
> This patch now adds pci_irqd_intx_xlate to the INTx IRQ domain ops,
> handling this IRQ number translation correctly.
s/pcie-xilinx-dma-pl:/xilinx-xdma:/ # in subject
s/has shown, that/has shown that/
s/This patch now adds/Add/
s/pci_irqd_intx_xlate/pci_irqd_intx_xlate()/
We'll do this when applying, no need to repost for this.
I wonder how many other drivers have this issue.
pci_irqd_intx_xlate() is used only by:
dwc/pci-dra7xx.c
pcie-altera.c
pcie-xilinx-nwl.c
pcie-xilinx.c
pcie-xilinx-dma-pl.c # this patch
Is there something different about these drivers that means they need
it when all the others don't?
> Signed-off-by: Stefan Roese <stefan.roese@mailbox.org>
> Cc: Sean Anderson <sean.anderson@linux.dev>
> Cc: Manivannan Sadhasivam <mani@kernel.org>
> Cc: Ravi Kumar Bandi <ravib@amazon.com>
> Cc: Thippeswamy Havalige <thippeswamy.havalige@amd.com>
> Cc: Michal Simek <michal.simek@amd.com>
> Cc: Bjorn Helgaas <bhelgaas@google.com>
> ---
> v2:
> - Use pci_irqd_intx_xlate to handle this IRQ number translation as suggested
> by Sean (thanks again)
>
> drivers/pci/controller/pcie-xilinx-dma-pl.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/pci/controller/pcie-xilinx-dma-pl.c b/drivers/pci/controller/pcie-xilinx-dma-pl.c
> index 84888eda990b2..80095457ec531 100644
> --- a/drivers/pci/controller/pcie-xilinx-dma-pl.c
> +++ b/drivers/pci/controller/pcie-xilinx-dma-pl.c
> @@ -370,6 +370,7 @@ static int xilinx_pl_dma_pcie_intx_map(struct irq_domain *domain,
> /* INTx IRQ Domain operations */
> static const struct irq_domain_ops intx_domain_ops = {
> .map = xilinx_pl_dma_pcie_intx_map,
> + .xlate = pci_irqd_intx_xlate,
> };
>
> static irqreturn_t xilinx_pl_dma_pcie_msi_handler_high(int irq, void *args)
> --
> 2.51.1
>
next prev parent reply other threads:[~2025-10-21 15:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-21 15:43 [PATCH v2] PCI: pcie-xilinx-dma-pl: Fix off-by-one INTx IRQ handling Stefan Roese
2025-10-21 15:53 ` Bjorn Helgaas [this message]
2025-10-21 16:02 ` Stefan Roese
2025-10-21 16:15 ` Bjorn Helgaas
2025-10-21 16:26 ` Sean Anderson
2025-10-21 17:30 ` Sean Anderson
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=20251021155347.GA1191808@bhelgaas \
--to=helgaas@kernel.org \
--cc=bhelgaas@google.com \
--cc=linux-pci@vger.kernel.org \
--cc=mani@kernel.org \
--cc=michal.simek@amd.com \
--cc=ravib@amazon.com \
--cc=sean.anderson@linux.dev \
--cc=stefan.roese@mailbox.org \
--cc=thippeswamy.havalige@amd.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