From: Niklas Cassel <cassel@kernel.org>
To: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Cc: jingoohan1@gmail.com, mani@kernel.org, lpieralisi@kernel.org,
kwilczynski@kernel.org, bhelgaas@google.com, robh@kernel.org,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
Bjorn Helgaas <helgaas@kernel.org>
Subject: Re: [PATCH 2/2] PCI: dwc: ep: Add MSI-X Enable checks before raising MSI-X to the host
Date: Fri, 27 Feb 2026 11:13:40 +0100 [thread overview]
Message-ID: <aaFuVOxHvKs9Mseu@ryzen> (raw)
In-Reply-To: <20260225162359.116000-3-manivannan.sadhasivam@oss.qualcomm.com>
On Wed, Feb 25, 2026 at 09:53:59PM +0530, Manivannan Sadhasivam wrote:
> PCIe spec r7, sec 7.7.2.2 mandates that a Function should raise MSI-X only
> if the MSI-X Enable bit is set and MSI enable bit is clear.
>
> Hence, add those checks to be spec compliant.
>
> Suggested-by: Bjorn Helgaas <helgaas@kernel.org>
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
> ---
> drivers/pci/controller/dwc/pcie-designware-ep.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/drivers/pci/controller/dwc/pcie-designware-ep.c b/drivers/pci/controller/dwc/pcie-designware-ep.c
> index fcbd648e049e..47bc33346342 100644
> --- a/drivers/pci/controller/dwc/pcie-designware-ep.c
> +++ b/drivers/pci/controller/dwc/pcie-designware-ep.c
> @@ -1018,6 +1018,15 @@ int dw_pcie_ep_raise_msix_irq(struct dw_pcie_ep *ep, u8 func_no,
> if (!ep_func || !ep_func->msix_cap)
> return -EINVAL;
>
> + /*
> + * PCIe spec r7, sec 7.7.2.2 mandates that a Function should raise MSI-X
> + * only if the MSI-X Enable bit is set and MSI Enable bit is clear.
> + */
> + if (!dw_pcie_ep_msix_enabled(ep, ep_func, func_no) ||
> + (dw_pcie_ep_msix_enabled(ep, ep_func, func_no) &&
> + dw_pcie_ep_msi_enabled(ep, ep_func, func_no)))
> + return -EOPNOTSUPP;
Same comment as patch 1/2.
Kind regards,
Niklas
prev parent reply other threads:[~2026-02-27 10:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-25 16:23 [PATCH 0/2] PCI: dwc: ep: MSI/MSI-X checks Manivannan Sadhasivam
2026-02-25 16:23 ` [PATCH 1/2] PCI: dwc: ep: Add MSI Enable checks before raising MSI to the host Manivannan Sadhasivam
2026-02-27 10:12 ` Niklas Cassel
2026-02-25 16:23 ` [PATCH 2/2] PCI: dwc: ep: Add MSI-X Enable checks before raising MSI-X " Manivannan Sadhasivam
2026-02-27 10:13 ` Niklas Cassel [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=aaFuVOxHvKs9Mseu@ryzen \
--to=cassel@kernel.org \
--cc=bhelgaas@google.com \
--cc=helgaas@kernel.org \
--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=mani@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