Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp408760rdh; Thu, 23 Nov 2023 07:11:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IGLqLfaRy5dcobZyKmQLFHXnXthg5y28suou3cEtrkDQSLO5IqfSLiImVV1Q1QuN38Eb2gi X-Received: by 2002:a05:6808:1a0d:b0:3b2:dfa0:aea3 with SMTP id bk13-20020a0568081a0d00b003b2dfa0aea3mr7082947oib.3.1700752318530; Thu, 23 Nov 2023 07:11:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700752318; cv=none; d=google.com; s=arc-20160816; b=o0lVQEzZJQ6xtYcFZTRgKRz2bZcXGPEaI2XkfDdGQieOWp/MFs7nGM3iauhDodGGRD 2KhneD+VLCfGIPu0LUN1bkIv8GbTff0uIpAiuOOz9jKRRBLp/yxupMAQ7M43F3foeFBA Kj6Ub7BCAM4xKYmdRocTURuC6yGqPl437lUMnSiirSJKYuyG/IBHD0MJuoXzCv2HaPkR 3Vh58ci4LTfs7/vlDl6BgDmLPvws6f+c/SxP2SGppVypBx/XoXJ+X42uy5qBl6AjDVNb aLSCetH4dl+ZsbEQHS2MIQ9/tnJbyXj1sjzLFCQCGYpdLNA7pswXGYdzQThFezoo6fdP iWYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:organization:message-id:date:subject:cc:to :from:dkim-signature; bh=vCSREdmF12ciPak77XKfEYKvFPyB+qsBWRT/VsT3I0Q=; fh=3T2HGWu5su8Ivly6TyDrweLiym+vUfYObYrCL0U27OU=; b=WUesXcOvx2gngIS06/4lHD0MLIKNJWk2EhJx/86uBxc6hhwJnnSlpzqTAY2pYcTXxF n7gud92VUN5bW/JlBc75eceOulgckivmjzb2IIUXE0yDAUnjp/WRMBAHInqIMjeo27xC rsDpm0LtR+hfxqH6Ht1AwseDz7/iPrL79Ep5YeXpTw9He8nJZhooL9E9Hz5m8bwUGVFO q2sGLFYqrLscXhhiDE7yGPWjYBQ4f180ni/BFsQTzSdCRXgQfdickd3TxlpiNkPPb13T R5f+et3tGU/83F5IhVlwAGtlg/Ll0TEW6xRfDobjUAHCBI4ASQRXo2MkTr/vaYaylanN y2SA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tq-group.com header.s=key1 header.b=ldaRZ7HM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=tq-group.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id e28-20020a631e1c000000b005c200b11630si1445565pge.45.2023.11.23.07.11.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 07:11:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@tq-group.com header.s=key1 header.b=ldaRZ7HM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=tq-group.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 06AC48027E1B; Thu, 23 Nov 2023 07:11:56 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345988AbjKWPLk (ORCPT + 99 others); Thu, 23 Nov 2023 10:11:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229532AbjKWPLj (ORCPT ); Thu, 23 Nov 2023 10:11:39 -0500 Received: from mx1.tq-group.com (mx1.tq-group.com [93.104.207.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4328ED41; Thu, 23 Nov 2023 07:11:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1700752303; x=1732288303; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=vCSREdmF12ciPak77XKfEYKvFPyB+qsBWRT/VsT3I0Q=; b=ldaRZ7HMIdDD20NNTPBtwZjx1uGRuPwaVblZqBnYA4pT8cEI6hj4R9Db VyfDkO252wG+gppwYM0X7gBTG41w8Uu4kPdpKAg4EwwKjX3Fnj74v4ts0 c0caHSWmnPXIsqlxEHd2Zl30K/aoJ9T9YNG3oG9hKKmygOEpnH1XWluQr UsoToHGwSFjrDVu/l0Ttp3KqDgL94JJwf80BigM2WXmdzIvfCZxiWMXdy qjMyU9w1bbEwFt9DkIa+TxoXJeupKWLK7cAdbpGy9v5L5sP6RpwyO33gd QQ8LmHmIzw/NQJYOCw3MP1RwCHlzfmci8g3SmQf+d6p+01QPjes2Zo32y w==; X-IronPort-AV: E=Sophos;i="6.04,222,1695679200"; d="scan'208";a="34146043" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 23 Nov 2023 16:11:41 +0100 Received: from steina-w.localnet (steina-w.tq-net.de [10.123.53.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by vtuxmail01.tq-net.de (Postfix) with ESMTPSA id 119CF280075; Thu, 23 Nov 2023 16:11:41 +0100 (CET) From: Alexander Stein To: netdev@vger.kernel.org, Heiko Schocher Cc: Heiko Schocher , Clark Wang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , NXP Linux Team , Paolo Abeni , Shenwei Wang , Wei Fang , linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: fec: fix probing of fec1 when fec0 is not probed yet Date: Thu, 23 Nov 2023 16:11:40 +0100 Message-ID: <5992842.lOV4Wx5bFT@steina-w> Organization: TQ-Systems GmbH In-Reply-To: <20231123132744.62519-1-hs@denx.de> References: <20231123132744.62519-1-hs@denx.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 23 Nov 2023 07:11:56 -0800 (PST) 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. >=20 > Return here with -EPROBE_DEFER so interface gets later > probed again. >=20 > 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=20 imx8qxp? Will this also help for imx6ul when fec1 is almost always probed before fec= 0=20 due to order of DT nodes? Best regards, Alexander > Signed-off-by: Heiko Schocher > --- >=20 > drivers/net/ethernet/freescale/fec_main.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > 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; > } >=20 > bus_freq =3D 2500000; /* 2.5MHz by default */ =2D-=20 TQ-Systems GmbH | M=FChlstra=DFe 2, Gut Delling | 82229 Seefeld, Germany Amtsgericht M=FCnchen, HRB 105018 Gesch=E4ftsf=FChrer: Detlef Schneider, R=FCdiger Stahl, Stefan Schneider http://www.tq-group.com/