public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] PCI: xilinx-cpm: Fix incorrect version check in init_port
@ 2025-03-11  7:24 Thippeswamy Havalige
  2025-03-11  7:27 ` Krzysztof Wilczyński
  0 siblings, 1 reply; 4+ messages in thread
From: Thippeswamy Havalige @ 2025-03-11  7:24 UTC (permalink / raw)
  To: bhelgaas, lpieralisi, kw, manivannan.sadhasivam, robh, krzk+dt,
	conor+dt
  Cc: linux-pci, devicetree, linux-kernel, michal.simek,
	bharat.kumar.gogada, Thippeswamy Havalige

Fix an incorrect conditional check in xilinx_cpm_pcie_init_port().

The previous condition mistakenly skipped initialization for all
versions except CPM5NC_HOST. This is now corrected to ensure that only
the CPM5NC_HOST is skipped while other versions proceed with
initialization.

Signed-off-by: Thippeswamy Havalige <thippeswamy.havalige@amd.com>
Fixes: 3f62f3280275 ("PCI: xilinx-cpm: Add support for Versal Net CPM5NC
Root Port controller")
---
 drivers/pci/controller/pcie-xilinx-cpm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/controller/pcie-xilinx-cpm.c b/drivers/pci/controller/pcie-xilinx-cpm.c
index c2dd6fda905f..d0ab187d917f 100644
--- a/drivers/pci/controller/pcie-xilinx-cpm.c
+++ b/drivers/pci/controller/pcie-xilinx-cpm.c
@@ -479,7 +479,7 @@ static void xilinx_cpm_pcie_init_port(struct xilinx_cpm_pcie *port)
 {
 	const struct xilinx_cpm_variant *variant = port->variant;
 
-	if (variant->version != CPM5NC_HOST)
+	if (variant->version == CPM5NC_HOST)
 		return;
 
 	if (cpm_pcie_link_up(port))
-- 
2.43.0


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

end of thread, other threads:[~2025-03-11 14:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-11  7:24 [PATCH] PCI: xilinx-cpm: Fix incorrect version check in init_port Thippeswamy Havalige
2025-03-11  7:27 ` Krzysztof Wilczyński
2025-03-11  9:58   ` Havalige, Thippeswamy
2025-03-11 14:50     ` Krzysztof Wilczyński

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