RE: [PATCH] PCI: xilinx-cpm: Fix incorrect version check in init_port

Havalige, Thippeswamy
2025-03-11T09:58:46Z

[AMD Official Use Only - AMD Internal Distribution Only]

Hello,

Thank you.

Regards,
Thippeswamy H

> -----Original Message-----
> From: Krzysztof Wilczyński <kw@linux.com>
> Sent: Tuesday, March 11, 2025 12:58 PM
> To: Havalige, Thippeswamy <thippeswamy.havalige@amd.com>
> Cc: bhelgaas@google.com; lpieralisi@kernel.org;
> manivannan.sadhasivam@linaro.org; robh@kernel.org; krzk+dt@kernel.org;
> conor+dt@kernel.org; linux-pci@vger.kernel.org; devicetree@vger.kernel.org;
> linux-kernel@vger.kernel.org; Simek, Michal <michal.simek@amd.com>;
> Gogada, Bharat Kumar <bharat.kumar.gogada@amd.com>
> Subject: Re: [PATCH] PCI: xilinx-cpm: Fix incorrect version check in init_port
>
> Hello,
>
> > 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.
>
> [...]
> > {
> > 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))
>
> Ouch! Nice catch.
>
> I will pull and squash this against the existing code directly on the branch.
>
> Thank you!
>
> Krzysztof