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]
Message-ID: <5992842.lOV4Wx5bFT@steina-w>
Date:   Thu, 23 Nov 2023 16:11:40 +0100
From:   Alexander Stein <alexander.stein@...tq-group.com>
To:     netdev@...r.kernel.org, Heiko Schocher <heiko.schocher@...il.com>
Cc:     Heiko Schocher <hs@...x.de>, Clark Wang <xiaoning.wang@....com>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        NXP Linux Team <linux-imx@....com>,
        Paolo Abeni <pabeni@...hat.com>,
        Shenwei Wang <shenwei.wang@....com>,
        Wei Fang <wei.fang@....com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: fec: fix probing of fec1 when fec0 is not probed yet

Hello Heiko,

Am Donnerstag, 23. November 2023, 14:27:43 CET schrieb Heiko Schocher:
> it is possible that fec1 is probed before fec0. On SoCs
> with FEC_QUIRK_SINGLE_MDIO set (which means fec1 uses mii
> from fec0) init of mii fails for fec1 when fec0 is not yet
> probed, as fec0 setups mii bus. In this case fec_enet_mii_init
> for fec1 returns with -ENODEV, and so fec1 never comes up.
> 
> Return here with -EPROBE_DEFER so interface gets later
> probed again.
> 
> Found this on imx8qxp based board, using 2 ethernet interfaces,
> and from time to time, fec1 interface came not up.

But FEC_QUIRK_SINGLE_MDIO is only set for imx28. How is this related to 
imx8qxp?
Will this also help for imx6ul when fec1 is almost always probed before fec0 
due to order of DT nodes?

Best regards,
Alexander

> Signed-off-by: Heiko Schocher <hs@...x.de>
> ---
> 
>  drivers/net/ethernet/freescale/fec_main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/freescale/fec_main.c
> b/drivers/net/ethernet/freescale/fec_main.c index
> c3b7694a7485..d956f95e7a65 100644
> --- a/drivers/net/ethernet/freescale/fec_main.c
> +++ b/drivers/net/ethernet/freescale/fec_main.c
> @@ -2445,7 +2445,7 @@ static int fec_enet_mii_init(struct platform_device
> *pdev) mii_cnt++;
>  			return 0;
>  		}
> -		return -ENOENT;
> +		return -EPROBE_DEFER;
>  	}
> 
>  	bus_freq = 2500000; /* 2.5MHz by default */


-- 
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
http://www.tq-group.com/


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ