From: Bjorn Helgaas <helgaas@kernel.org>
To: Hans Zhang <18255117159@163.com>
Cc: lpieralisi@kernel.org, kwilczynski@kernel.org,
bhelgaas@google.com, mani@kernel.org, robh@kernel.org,
sashal@kernel.org, linux-pci@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] pci: cadence-ep: Fix incorrect MSI capability ID
Date: Mon, 13 Oct 2025 16:50:36 -0500 [thread overview]
Message-ID: <20251013215036.GA866714@bhelgaas> (raw)
In-Reply-To: <20251010144307.12979-1-18255117159@163.com>
On Fri, Oct 10, 2025 at 10:43:07PM +0800, Hans Zhang wrote:
> In a previous change, the MSIX capability ID (PCI_CAP_ID_MSIX)
> was mistakenly used when trying to locate the MSI capability in
> cdns_pcie_ep_get_msi(). This is incorrect as the function handles
> MSI functionality, not MSIX.
>
> Fix this by replacing PCI_CAP_ID_MSIX with the correct MSI capability
> ID(PCI_CAP_ID_MSI) when calling cdns_pcie_find_capability(). This
> ensures the MSI capability is properly located, allowing MSI functionality
> to work asintended.
>
> Fixes: 907912c1daa7 ("PCI: cadence: Use cdns_pcie_find_*capability() to avoid hardcoding offsets")
> Reported-by: Sasha Levin <sashal@kernel.org>
> Closes: https://lore.kernel.org/r/aOfMk9BW8BH2P30V@laps/
> Signed-off-by: Hans Zhang <18255117159@163.com>
Applied to pci/for-linus for v6.18, thanks!
> ---
> Dear Maintainer,
>
> Since the previous patch mistakenly changed the MSI ID to MSIX ID,
> a patch is submitted here to fix it. Thank you very much, Sasha, for
> pointing it out.
>
> Best regards,
> Hans
> ---
> drivers/pci/controller/cadence/pcie-cadence-ep.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pci/controller/cadence/pcie-cadence-ep.c b/drivers/pci/controller/cadence/pcie-cadence-ep.c
> index 1eac012a8226..c0e1194a936b 100644
> --- a/drivers/pci/controller/cadence/pcie-cadence-ep.c
> +++ b/drivers/pci/controller/cadence/pcie-cadence-ep.c
> @@ -255,7 +255,7 @@ static int cdns_pcie_ep_get_msi(struct pci_epc *epc, u8 fn, u8 vfn)
> u16 flags, mme;
> u8 cap;
>
> - cap = cdns_pcie_find_capability(pcie, PCI_CAP_ID_MSIX);
> + cap = cdns_pcie_find_capability(pcie, PCI_CAP_ID_MSI);
> fn = cdns_pcie_get_fn_from_vfn(pcie, fn, vfn);
>
> /* Validate that the MSI feature is actually enabled. */
> --
> 2.34.1
>
prev parent reply other threads:[~2025-10-13 21:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-10 14:43 [PATCH v2] pci: cadence-ep: Fix incorrect MSI capability ID Hans Zhang
2025-10-13 21:50 ` Bjorn Helgaas [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=20251013215036.GA866714@bhelgaas \
--to=helgaas@kernel.org \
--cc=18255117159@163.com \
--cc=bhelgaas@google.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=robh@kernel.org \
--cc=sashal@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