mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alex Elder <elder@riscstar.com>
To: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>,
	jingoohan1@gmail.com, lpieralisi@kernel.org,
	kwilczynski@kernel.org
Cc: robh@kernel.org, bhelgaas@google.com, linux-pci@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] PCI: dwc: Warn if the MSI ctrl doesn't have an associated platform IRQ in DT
Date: Thu, 30 Oct 2025 12:40:52 -0500	[thread overview]
Message-ID: <43333e1f-dcc2-4691-9551-3c35ba04bf7b@riscstar.com> (raw)
In-Reply-To: <20251030171346.5129-1-manivannan.sadhasivam@oss.qualcomm.com>

On 10/30/25 12:13 PM, Manivannan Sadhasivam wrote:
> The internal MSI controller in DWC IPs supports multiple MSI ctrls, each
> capable of receiving 32 MSI vectors per ctrl. And each MSI ctrl requires a
> dedicated MSI platform IRQ in devicetree to function. Otherwise, MSIs won't
> be received from the endpoints.
> 
> Currently, dw_pcie_msi_host_init() only registers the IRQ handler if the
> MSI ctrl has the associated MSI platform IRQ in DT. But it doesn't warn if
> the IRQ is not available. This may cause developers/users to believe that
> the platform supports MSI vectors from all MSI ctrls, but it doesn't.
> 
> This discrepancy can happen due to two reasons:
> 
> 1. Controller driver incorrectly set the dw_pcie_rp::num_vectors field.
> 2. DT missed specifying the MSI IRQs
> 
> To catch these, add a warning so that the above mentioned discrepancies
> could be reported and fixed accordingly.
> 
> Fixes: db388348acff ("PCI: dwc: Convert struct pcie_port.msi_irq to an array")
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>


Reviewed-by: Alex Elder <elder@riscstar.com>
Tested-by: Alex Elder <elder@riscstar.com>


> ---
>   drivers/pci/controller/dwc/pcie-designware-host.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pci/controller/dwc/pcie-designware-host.c
> index 20c9333bcb1c..f163f5b6ad3d 100644
> --- a/drivers/pci/controller/dwc/pcie-designware-host.c
> +++ b/drivers/pci/controller/dwc/pcie-designware-host.c
> @@ -357,6 +357,8 @@ int dw_pcie_msi_host_init(struct dw_pcie_rp *pp)
>   		if (pp->msi_irq[ctrl] > 0)
>   			irq_set_chained_handler_and_data(pp->msi_irq[ctrl],
>   						    dw_chained_msi_isr, pp);
> +		else
> +			dev_warn(dev, "MSI ctrl %d doesn't have platform IRQ in DT", ctrl);
>   	}
>   
>   	/*


  reply	other threads:[~2025-10-30 17:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-30 17:13 Manivannan Sadhasivam
2025-10-30 17:40 ` Alex Elder [this message]
2025-11-08 10:18 ` Manivannan Sadhasivam
2025-11-11 10:31   ` 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=43333e1f-dcc2-4691-9551-3c35ba04bf7b@riscstar.com \
    --to=elder@riscstar.com \
    --cc=bhelgaas@google.com \
    --cc=jingoohan1@gmail.com \
    --cc=kwilczynski@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=manivannan.sadhasivam@oss.qualcomm.com \
    --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

all inboxes | Powered by JetHome®