lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20241106005758.GA1498067@bhelgaas>
Date: Tue, 5 Nov 2024 18:57:58 -0600
From: Bjorn Helgaas <helgaas@...nel.org>
To: Siddharth Vadapalli <s-vadapalli@...com>
Cc: lpieralisi@...nel.org, kw@...ux.com, robh@...nel.org,
	bhelgaas@...gle.com, manivannan.sadhasivam@...aro.org,
	kishon@...nel.org, u.kleine-koenig@...gutronix.de,
	cassel@...nel.org, dlemoal@...nel.org,
	yoshihiro.shimoda.uh@...esas.com, linux-pci@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	srk@...com
Subject: Re: [PATCH v2 1/2] PCI: keystone: Set mode as RootComplex for
 "ti,keystone-pcie" compatible

On Fri, May 24, 2024 at 04:27:13PM +0530, Siddharth Vadapalli wrote:
> From: Kishon Vijay Abraham I <kishon@...com>
> 
> commit 23284ad677a9 ("PCI: keystone: Add support for PCIe EP in AM654x
> Platforms") introduced configuring "enum dw_pcie_device_mode" as part of
> device data ("struct ks_pcie_of_data"). However it failed to set mode
> for "ti,keystone-pcie" compatible. Set mode as RootComplex for
> "ti,keystone-pcie" compatible here.

23284ad677a9 appeared in v5.10.  

But I guess RC support has not been broken since v5.10 because we
never used ks_pcie_rc_of_data.mode anyway?

It looks like the only use is here:

  #define DW_PCIE_VER_365A                0x3336352a
  #define DW_PCIE_VER_480A                0x3438302a

  ks_pcie_probe
  {
    ...
    mode = data->mode;
    ...
    if (dw_pcie_ver_is_ge(pci, 480A))
      ret = ks_pcie_am654_set_mode(dev, mode);
    else
      ret = ks_pcie_set_mode(dev);

so we don't even look at .mode unless the version is v4.80a or later,
and this is v3.65a?

So this is basically a cosmetic fix (but still worth doing for
readability!) and doesn't need a stable backport, right?

If so, I might amend the commit log to mention the fact that this
doesn't actually fix a functional issue.

> Fixes: 23284ad677a9 ("PCI: keystone: Add support for PCIe EP in AM654x Platforms")
> Signed-off-by: Kishon Vijay Abraham I <kishon@...com>
> Signed-off-by: Siddharth Vadapalli <s-vadapalli@...com>
> ---
>  drivers/pci/controller/dwc/pci-keystone.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/pci/controller/dwc/pci-keystone.c b/drivers/pci/controller/dwc/pci-keystone.c
> index d3a7d14ee685..3184546ba3b6 100644
> --- a/drivers/pci/controller/dwc/pci-keystone.c
> +++ b/drivers/pci/controller/dwc/pci-keystone.c
> @@ -1064,6 +1064,7 @@ static int ks_pcie_am654_set_mode(struct device *dev,
>  
>  static const struct ks_pcie_of_data ks_pcie_rc_of_data = {
>  	.host_ops = &ks_pcie_host_ops,
> +	.mode = DW_PCIE_RC_TYPE,
>  	.version = DW_PCIE_VER_365A,
>  };
>  
> -- 
> 2.40.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ