Linux PCI subsystem development
 help / color / mirror / Atom feed
* [PATCH] pci: cadence-ep: Fix incorrect MSI capability ID
@ 2025-10-09 16:10 Hans Zhang
  2025-10-10  7:42 ` Lukas Wunner
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Zhang @ 2025-10-09 16:10 UTC (permalink / raw)
  To: lpieralisi, kwilczynski, bhelgaas, helgaas, mani
  Cc: robh, sashal, linux-pci, linux-kernel, Hans Zhang

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(). Thisis 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 theMSI capability is properly located, allowing MSI functionality
to work asintended.

Signed-off-by: Hans Zhang <18255117159@163.com>
---
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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-10-10 14:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-09 16:10 [PATCH] pci: cadence-ep: Fix incorrect MSI capability ID Hans Zhang
2025-10-10  7:42 ` Lukas Wunner
2025-10-10 14:38   ` Hans Zhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox