From: Thippeswamy Havalige <thippeswamy.havalige@amd.com>
To: <bhelgaas@google.com>, <lpieralisi@kernel.org>, <kw@linux.com>,
<manivannan.sadhasivam@linaro.org>, <robh@kernel.org>,
<krzk+dt@kernel.org>, <conor+dt@kernel.org>
Cc: <linux-pci@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <michal.simek@amd.com>,
<bharat.kumar.gogada@amd.com>,
Thippeswamy Havalige <thippeswamy.havalige@amd.com>
Subject: [PATCH] PCI: xilinx-cpm: Fix incorrect version check in init_port
Date: Tue, 11 Mar 2025 12:54:02 +0530 [thread overview]
Message-ID: <20250311072402.1049990-1-thippeswamy.havalige@amd.com> (raw)
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
next reply other threads:[~2025-03-11 7:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-11 7:24 Thippeswamy Havalige [this message]
2025-03-11 7:27 ` [PATCH] PCI: xilinx-cpm: Fix incorrect version check in init_port Krzysztof Wilczyński
2025-03-11 9:58 ` Havalige, Thippeswamy
2025-03-11 14:50 ` Krzysztof Wilczyński
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=20250311072402.1049990-1-thippeswamy.havalige@amd.com \
--to=thippeswamy.havalige@amd.com \
--cc=bharat.kumar.gogada@amd.com \
--cc=bhelgaas@google.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=kw@linux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=michal.simek@amd.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