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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 28 Sep 2021 00:01:09 +0200
From:   Krzysztof Wilczyński <kw@...ux.com>
To:     Pali Rohár <pali@...nel.org>
Cc:     Toan Le <toan@...amperecomputing.com>,
        Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
        Rob Herring <robh@...nel.org>,
        Bjorn Helgaas <bhelgaas@...gle.com>, linux-pci@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] PCI: xgene: Use PCI_VENDOR_ID_AMCC macro

Hi Pali,

> Header file linux/pci_ids.h defines AMCC vendor id (0x10e8) macro named
> PCI_VENDOR_ID_AMCC. So use this macro instead of driver custom macro.

[...]
> -#define XGENE_PCIE_VENDORID		0x10E8

Another possible way of doing this might have been to alias the macro:

	#define XGENE_PCIE_VENDORID		PCI_VENDOR_ID_AMCC

Not sure if this would be more or less confusing - I certainly had to go
and look up what "AMCC" was.  Only to found out they got sold few years
ago, and such...

Nothing to change here, though.

>  #define XGENE_PCIE_DEVICEID		0xE004
>  #define SZ_1T				(SZ_1G*1024ULL)
>  #define PIPE_PHY_RATE_RD(src)		((0xc000 & (u32)(src)) >> 0xe)
> @@ -560,7 +559,7 @@ static int xgene_pcie_setup(struct xgene_pcie_port *port)
>  	xgene_pcie_clear_config(port);
>  
>  	/* setup the vendor and device IDs correctly */
> -	val = (XGENE_PCIE_DEVICEID << 16) | XGENE_PCIE_VENDORID;
> +	val = (XGENE_PCIE_DEVICEID << 16) | PCI_VENDOR_ID_AMCC;
>  	xgene_pcie_writel(port, BRIDGE_CFG_0, val);

Thank you!

Reviewed-by: Krzysztof Wilczyński <kw@...ux.com>

	Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ