Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Sean Anderson <sean.anderson@linux.dev>
To: Stefan Roese <stefan.roese@mailbox.org>, linux-pci@vger.kernel.org
Cc: 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 13:30:07 -0400	[thread overview]
Message-ID: <3191d3b5-2319-4cd4-b5b0-8fb6413e2c73@linux.dev> (raw)
In-Reply-To: <20251021154322.973640-1-stefan.roese@mailbox.org>

On 10/21/25 11:43, 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.
> 
> 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)

Reviewed-by: Sean Anderson <sean.anderson@linux.dev>

      parent reply	other threads:[~2025-10-21 17:30 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
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 [this message]

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=3191d3b5-2319-4cd4-b5b0-8fb6413e2c73@linux.dev \
    --to=sean.anderson@linux.dev \
    --cc=bhelgaas@google.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=mani@kernel.org \
    --cc=michal.simek@amd.com \
    --cc=ravib@amazon.com \
    --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