From: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>
To: Niklas Cassel <cassel@kernel.org>,
Manivannan Sadhasivam <mani@kernel.org>
Cc: "Jingoo Han" <jingoohan1@gmail.com>,
"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Frank Li" <Frank.Li@nxp.com>,
"Damien Le Moal" <dlemoal@kernel.org>,
"Koichiro Den" <den@valinux.co.jp>,
linux-pci@vger.kernel.org
Subject: Re: [PATCH] PCI: dwc: ep: Cache MSI outbound iATU mapping
Date: Mon, 22 Dec 2025 17:53:27 +0530 [thread overview]
Message-ID: <3b34aa66-a418-4f6b-930a-0728d87d79b6@oss.qualcomm.com> (raw)
In-Reply-To: <aUknSzSpNxLeEN5o@ryzen>
On 12/22/2025 4:41 PM, Niklas Cassel wrote:
> On Mon, Dec 22, 2025 at 03:28:30PM +0530, Manivannan Sadhasivam wrote:
>>> Use the MSIX doorbell method which will not use iATU at all,
>>> dw_pcie_ep_raise_msix_irq_doorbell().
>>>
>> I think this is the safe bet since this feature doesn't seem like an optional
>> one.
>>
>> Niklas, if you can just fix MSI in this patch and leave out MSI-X for the vendor
>> drivers to transition to doorbell, I'm OK to merge it. Otherwise, I don't know
>> how you can reliably fix MSI-X generation with AXI slave interface.
> FWIW, I did try to simply change:
>
> diff --git a/drivers/pci/controller/dwc/pcie-dw-rockchip.c b/drivers/pci/controller/dwc/pcie-dw-rockchip.c
> index 8f2cc1ef25e3..00770f9786e3 100644
> --- a/drivers/pci/controller/dwc/pcie-dw-rockchip.c
> +++ b/drivers/pci/controller/dwc/pcie-dw-rockchip.c
> @@ -319,7 +319,8 @@ static int rockchip_pcie_raise_irq(struct dw_pcie_ep *ep, u8 func_no,
> case PCI_IRQ_MSI:
> return dw_pcie_ep_raise_msi_irq(ep, func_no, interrupt_num);
> case PCI_IRQ_MSIX:
> - return dw_pcie_ep_raise_msix_irq(ep, func_no, interrupt_num);
> + return dw_pcie_ep_raise_msix_irq_doorbell(ep, func_no,
> + interrupt_num);
> default:
> dev_err(pci->dev, "UNKNOWN IRQ type\n");
> }
>
>
> For the pcie-dw-rockchip driver, but it is not working:
> [ 130.042849] nvme nvme0: I/O tag 0 (1000) QID 0 timeout, completion polled
>
> Without this change, things work.
>
> Perhaps this feature is not an optional one, but at least we will require
> more changes than a simple one liner.
Hi Niklas,
It should be automatic only, no extra configurations should be required,
I believe your
HW doesn't support this feature, from spec 6..0a, sec 3.9.1.3 iMSIX-TX:
Integrated MSI-X Transmit (USP)
I believe your HW is not generated with MSIX_TABLE_EN =1. In that case
you can't use this feature.
or
Are using VF for NVMe, in that MSIX doorbell logic needs to be updated
for VF's also.
There is one more option to use MSIX with out using iATU i.e MSIX
address match mode
taken from same section above this also, but it is not clear to me if
this feature also depends
on MSIX_TABLE_EN=1. May be give it try once.
"Automatic triggering of MSI-X generation when your application issues a
MWr at the
AXI subordi nate interface with an address equal to
MSIX_ADDRESS_MATCH_LOW_OFF
and MSIX_ADDRESS_ MATCH_HIGH_OFF.
❑ MWr must be DWORD-aligned and must contain MSI-X vector, TC, and
function number.
■ When your local application issues an MWr on the AXI subordinate
interface to a specific address
(MSIX_ADDRESS_MATCH_LOW_OFF), the controller extracts the vector and TC
information from the
MWr payload and creates the MSI-X request.
■ AXI bridge guarantees ordering coherency by forwarding the MSI-X
request after the preceding MWr has been transmitted.
■ Processes one MSI-X request at a time and halts subordinate access if
a second MSI-X request is submitted before first one is complete"
we can allocated a address and write in this MSIX Address match register
at probe and update that address with the vector
number and function number etc(Same as how we write in MSIX doorbell
register) when we want to send the msix.
- Krishna Chaitanya.
>
>
> Kind regards,
> Niklas
next prev parent reply other threads:[~2025-12-22 12:23 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-10 7:13 [PATCH] PCI: dwc: ep: Cache MSI outbound iATU mapping Niklas Cassel
2025-12-22 8:19 ` Krishna Chaitanya Chundru
2025-12-22 8:36 ` Niklas Cassel
2025-12-22 8:42 ` Krishna Chaitanya Chundru
2025-12-22 8:49 ` Niklas Cassel
2025-12-22 9:58 ` Manivannan Sadhasivam
2025-12-22 10:42 ` Niklas Cassel
2025-12-22 11:11 ` Niklas Cassel
2025-12-22 11:19 ` Manivannan Sadhasivam
2025-12-22 12:23 ` Krishna Chaitanya Chundru [this message]
2025-12-22 13:00 ` Niklas Cassel
2025-12-23 1:12 ` Shawn Lin
2025-12-23 4:35 ` Krishna Chaitanya Chundru
2025-12-23 6:23 ` Shawn Lin
2025-12-23 7:12 ` Niklas Cassel
2026-01-05 11:06 ` Niklas Cassel
2026-01-06 1:37 ` Shawn Lin
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=3b34aa66-a418-4f6b-930a-0728d87d79b6@oss.qualcomm.com \
--to=krishna.chundru@oss.qualcomm.com \
--cc=Frank.Li@nxp.com \
--cc=bhelgaas@google.com \
--cc=cassel@kernel.org \
--cc=den@valinux.co.jp \
--cc=dlemoal@kernel.org \
--cc=jingoohan1@gmail.com \
--cc=kwilczynski@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=mani@kernel.org \
--cc=robh@kernel.org \
/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