From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-184.mta0.migadu.com (out-184.mta0.migadu.com [91.218.175.184]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2787A229B38 for ; Tue, 21 Oct 2025 17:30:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.184 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761067817; cv=none; b=tnyDQpRtwtsjTQjsp6o9WfoG4ovTQlQZ6PyJt3k0bfBA0GElz/pq6TM5W4rVbV4cFT0tOxfg1aaIkQtwbe2oXjngOTEiP/ajse1dBuxfby+b8IN9dMSUKzyXoIe/ewgOcfl2JOk6DV1ENFUZLEdJ75FHLceZ5lcdedUAVpNrWZo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761067817; c=relaxed/simple; bh=Cx3wXl8Sbh3saUIZvSNdo2sAZJhVpMyZYIBZ+E7bFeI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=STQ+NiRyhPdLMMqz2SQD8LCr1KYracBn6gwi79Iwyga3geMJRM2EZiNtB30suMkkyw0JvrAblbNpF1ECSQ3oTeOMIsIhZGeT3ysS6doFp3/6HVSXvvz6HEjW78LdPyMPD3DUZeQf1jLKTP6wzmX4UEymqI7tDC1npc+CM3MOl4k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=WPk/ggQi; arc=none smtp.client-ip=91.218.175.184 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="WPk/ggQi" Message-ID: <3191d3b5-2319-4cd4-b5b0-8fb6413e2c73@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1761067811; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=daSNURvAZs6Hw2eLkKXlbvLSCGcIPcuoh7yB+EjKrCU=; b=WPk/ggQiTnx0y6wt66fusC9AGhgfxsAYeQe9JpccAvJh5FpzTgaCa5f0imbUq5PeNR8m6h orM7O+5n2VRjSFdqusz5XKm86vZ4R/WrtZJvmx9UiHp0o+eEkFl0g+mMCHSiV7mg90HvTf yxA2KEY15w1Gv1tzJ+FyU/e6lBw+7KM= Date: Tue, 21 Oct 2025 13:30:07 -0400 Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH v2] PCI: pcie-xilinx-dma-pl: Fix off-by-one INTx IRQ handling To: Stefan Roese , linux-pci@vger.kernel.org Cc: Manivannan Sadhasivam , Ravi Kumar Bandi , Thippeswamy Havalige , Michal Simek , Bjorn Helgaas References: <20251021154322.973640-1-stefan.roese@mailbox.org> Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Sean Anderson In-Reply-To: <20251021154322.973640-1-stefan.roese@mailbox.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT 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 > Cc: Sean Anderson > Cc: Manivannan Sadhasivam > Cc: Ravi Kumar Bandi > Cc: Thippeswamy Havalige > Cc: Michal Simek > Cc: Bjorn Helgaas > --- > 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