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:   Sat, 16 Jan 2021 10:12:21 +0100
From:   Jan Kiszka <jan.kiszka@...mens.com>
To:     Wong Vee Khee <vee.khee.wong@...el.com>,
        Giuseppe Cavallaro <peppe.cavallaro@...com>,
        Alexandre Torgue <alexandre.torgue@...com>,
        Jose Abreu <joabreu@...opsys.com>,
        "David S . Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Maxime Coquelin <mcoquelin.stm32@...il.com>
Cc:     netdev@...r.kernel.org, linux-stm32@...md-mailman.stormreply.com,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        Ong Boon Leong <boon.leong.ong@...el.com>,
        Voon Wei Feng <weifeng.voon@...el.com>
Subject: Re: [PATCH net-next 1/1] stmmac: intel: change all EHL/TGL to auto
 detect phy addr

On 06.11.20 10:43, Wong Vee Khee wrote:
> From: Voon Weifeng <weifeng.voon@...el.com>
> 
> Set all EHL/TGL phy_addr to -1 so that the driver will automatically
> detect it at run-time by probing all the possible 32 addresses.
> 
> Signed-off-by: Voon Weifeng <weifeng.voon@...el.com>
> Signed-off-by: Wong Vee Khee <vee.khee.wong@...el.com>
> ---
>  drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
> index b6e5e3e36b63..7c1353f37247 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
> @@ -236,6 +236,7 @@ static int intel_mgbe_common_data(struct pci_dev *pdev,
>  	int ret;
>  	int i;
>  
> +	plat->phy_addr = -1;
>  	plat->clk_csr = 5;
>  	plat->has_gmac = 0;
>  	plat->has_gmac4 = 1;
> @@ -345,7 +346,6 @@ static int ehl_sgmii_data(struct pci_dev *pdev,
>  			  struct plat_stmmacenet_data *plat)
>  {
>  	plat->bus_id = 1;
> -	plat->phy_addr = 0;
>  	plat->phy_interface = PHY_INTERFACE_MODE_SGMII;
>  
>  	plat->serdes_powerup = intel_serdes_powerup;
> @@ -362,7 +362,6 @@ static int ehl_rgmii_data(struct pci_dev *pdev,
>  			  struct plat_stmmacenet_data *plat)
>  {
>  	plat->bus_id = 1;
> -	plat->phy_addr = 0;
>  	plat->phy_interface = PHY_INTERFACE_MODE_RGMII;
>  
>  	return ehl_common_data(pdev, plat);
> @@ -376,7 +375,6 @@ static int ehl_pse0_common_data(struct pci_dev *pdev,
>  				struct plat_stmmacenet_data *plat)
>  {
>  	plat->bus_id = 2;
> -	plat->phy_addr = 1;
>  	return ehl_common_data(pdev, plat);
>  }
>  
> @@ -408,7 +406,6 @@ static int ehl_pse1_common_data(struct pci_dev *pdev,
>  				struct plat_stmmacenet_data *plat)
>  {
>  	plat->bus_id = 3;
> -	plat->phy_addr = 1;
>  	return ehl_common_data(pdev, plat);
>  }
>  
> @@ -450,7 +447,6 @@ static int tgl_sgmii_data(struct pci_dev *pdev,
>  			  struct plat_stmmacenet_data *plat)
>  {
>  	plat->bus_id = 1;
> -	plat->phy_addr = 0;
>  	plat->phy_interface = PHY_INTERFACE_MODE_SGMII;
>  	plat->serdes_powerup = intel_serdes_powerup;
>  	plat->serdes_powerdown = intel_serdes_powerdown;
> 

This fixes PHY detection on one of our EHL-based boards. Can this also
be applied to stable 5.10?

Thanks,
Jan

-- 
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux

Powered by blists - more mailing lists