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] [day] [month] [year] [list]
Date:   Sun, 11 Sep 2022 18:31:04 +0300
From:   Serge Semin <fancer.lancer@...il.com>
To:     Keguang Zhang <keguang.zhang@...il.com>,
        Thomas Bogendoerfer <tsbogend@...ha.franken.de>
Cc:     linux-mips@...r.kernel.org, linux-kernel@...r.kernel.org,
        Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
        "David S . Miller" <davem@...emloft.net>
Subject: Re: [PATCH] MIPS: loongson32: Fix the validation failure of LS1B &
 LS1C Ethernet PHY

Hello Thomas,
Just so you know. This patch is supposed to be superseded with the next one:
https://lore.kernel.org/linux-mips/20220911072251.25024-1-keguang.zhang@gmail.com
* or with v2 of the later one.

-Sergey

On Thu, Aug 18, 2022 at 01:00:19PM +0800, Keguang Zhang wrote:
> From: Kelvin Cheung <keguang.zhang@...il.com>
> 
> The Ethernet of LS1B/LS1C doesn't work due to the stmmac driver
> using phylink_generic_validate() instead of stmmac_validate().
> Moreover the driver assumes the PHY interface mode
> passed in platform data is always supported.
> 
> stmmaceth stmmaceth.0 eth0: validation of gmii with support 00000000,00000000,000062cf and advertisement 00000000,00000000,000062cf failed: -EINVAL
> stmmaceth stmmaceth.0 eth0: stmmac_open: Cannot attach to PHY (error: -22)
> 
> This patch sets phy_interface field of platform data.
> 
> Fixes: 04a0683f7db4 ("net: stmmac: convert to phylink_generic_validate()")
> Fixes: d194923d51c9 ("net: stmmac: fill in supported_interfaces")
> Signed-off-by: Kelvin Cheung <keguang.zhang@...il.com>
> ---
>  arch/mips/loongson32/common/platform.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/mips/loongson32/common/platform.c b/arch/mips/loongson32/common/platform.c
> index 794c96c2a4cd..741aace80b80 100644
> --- a/arch/mips/loongson32/common/platform.c
> +++ b/arch/mips/loongson32/common/platform.c
> @@ -147,8 +147,10 @@ static struct plat_stmmacenet_data ls1x_eth0_pdata = {
>  	.phy_addr		= -1,
>  #if defined(CONFIG_LOONGSON1_LS1B)
>  	.interface		= PHY_INTERFACE_MODE_MII,
> +	.phy_interface		= PHY_INTERFACE_MODE_MII,
>  #elif defined(CONFIG_LOONGSON1_LS1C)
>  	.interface		= PHY_INTERFACE_MODE_RMII,
> +	.phy_interface		= PHY_INTERFACE_MODE_RMII,
>  #endif
>  	.mdio_bus_data		= &ls1x_mdio_bus_data,
>  	.dma_cfg		= &ls1x_eth_dma_cfg,
> 
> base-commit: 568035b01cfb107af8d2e4bd2fb9aea22cf5b868
> -- 
> 2.34.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ