Skip to contentSkip to conversation

pci: cadence-ep: Fix incorrect MSI capability ID

PATCH Applied Hans Zhang 2 participants 2 messages Oct 10, 2025 – Oct 13, 2025

Subsystems (3)
lore
Share & tools
lore

Hans Zhang

author
#0 lore raw

PATCH v2 1/1 pci: cadence-ep: Fix incorrect MSI capability ID

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")

---
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(-)
drivers/pci/controller/cadence/pcie-cadence-ep.c +1 -1
index 1eac012a8226..c0e1194a936b 100644
@@ -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. */
Signature · 1 line
2.34.1
#1 lore raw
Quoted 10 lines · 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(). 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.

Quoted 4 lines
Fixes 907912c1daa7 ("PCI: cadence: Use cdns_pcie_find_*capability() to avoid hardcoding offsets")

Applied to pci/for-linus for v6.18, thanks!

Quoted 29 lines

---
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(-)
drivers/pci/controller/cadence/pcie-cadence-ep.c +1 -1
index 1eac012a8226..c0e1194a936b 100644
@@ -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. */
Signature · 1 line
2.34.1