Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp259406rwb; Tue, 4 Oct 2022 03:46:03 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4IO/zWu607EMwzbQ9WLIFI5NijhT43YQhQ2A2JgYRTun94vylwil+R0obRNQVQ/WyEtFmN X-Received: by 2002:a17:902:e54b:b0:178:75b9:f1e9 with SMTP id n11-20020a170902e54b00b0017875b9f1e9mr26683083plf.104.1664880362693; Tue, 04 Oct 2022 03:46:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664880362; cv=none; d=google.com; s=arc-20160816; b=at3/CYH79X1zgaIYsYTBA34UFRMZE5is28tmMAJn0FBK+uPkjfsvH/jkDFuKDbgSBG h2t0XVDyQT+NIMrbUf7NJ9T0vP8XxI6zriBLNBKwQbQwcV1w4DKAXkfcVoYdiLoxEGe+ dmeKSOb/iisW0c2oq0FrL11rBf023TNZ7ROEO+6Y02I4ZFwon9QliKlyVk/REm9vZpZQ DHQCELFIOSc8Dmll2v6euRbO1B4zRHkLaNAvXTnjuPoWIh33u7jFlIhWcO7eTPNNUHCs zHeq5k4JGqKY3dGmr0hcXYndFRfuFxWcyq/f7O2Yf2zgRwJsUnvBbel+Y5vwpu9QIXa2 YstA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=JZxE/DrQfoHroAOfEf2EOcza83rLek3j/A2WBDAll4w=; b=yRv63WSU6fJoq8EMhqzVpcb5etdGvlPNQ4/y00Z53ZAnkp/JtzOKjU5L++fMT+OgJF 7RzES6Q4FAEvDU+xMBFjAuNm/SUePc7Bg5JnQ2b+cZHHcv2wrlWD2lyFVHCwsWt3O3HT 54SCOiXkSDAusMxPOAJ2k3sJSHNp7O99qHiMrA5Bq8kpiCaN7C419IeAfrvgSQ5GY0fa CFW3L+JDBhbEheaU8K3LmRIye5l3A9Ca8Qh8xbJRAJAUYzc+YDyccqMiGC2XQX7hKKzw wQVf24Z/czVZb5rhv0ty52kQvFQSJVTxd9IucM19mZu7bK1X/szlu3FSxbPS9MMxgGti DKlA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id pf11-20020a17090b1d8b00b00207095227f9si2808840pjb.186.2022.10.04.03.45.42; Tue, 04 Oct 2022 03:46:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229816AbiJDKQg (ORCPT + 99 others); Tue, 4 Oct 2022 06:16:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229662AbiJDKQd (ORCPT ); Tue, 4 Oct 2022 06:16:33 -0400 Received: from jabberwock.ucw.cz (jabberwock.ucw.cz [46.255.230.98]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC94F2BE23; Tue, 4 Oct 2022 03:16:31 -0700 (PDT) Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id 298091C0036; Tue, 4 Oct 2022 12:16:30 +0200 (CEST) Date: Tue, 4 Oct 2022 12:16:27 +0200 From: Pavel Machek To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Junxiao Chang , Voon Weifeng , Jimmy JS Chen , "Looi, Hong Aun" , Paolo Abeni , Sasha Levin , Looi@vger.kernel.org Subject: Re: [PATCH 5.10 46/52] net: stmmac: power up/down serdes in stmmac_open/release Message-ID: <20221004101627.GA30005@duo.ucw.cz> References: <20221003070718.687440096@linuxfoundation.org> <20221003070720.101874721@linuxfoundation.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="4Ckj6UjgE2iN1+kY" Content-Disposition: inline In-Reply-To: <20221003070720.101874721@linuxfoundation.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,SPF_HELO_NONE,SPF_NONE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --4Ckj6UjgE2iN1+kY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > The issue is related with serdes which impacts clock. There is > serdes in ADLink I-Pi SMARC board ethernet controller. Please refer to > commit b9663b7ca6ff78 ("net: stmmac: Enable SERDES power up/down sequence= ") > for detial. When issue is reproduced, DMA engine clock is not ready > because serdes is not powered up. I don't believe you got the error handling right. > index 27b7bb64a028..41e71a26b1ad 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c > +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c > @@ -2907,6 +2907,15 @@ static int stmmac_open(struct net_device *dev) > goto init_error; > } > =20 > + if (priv->plat->serdes_powerup) { > + ret =3D priv->plat->serdes_powerup(dev, priv->plat->bsp_priv); > + if (ret < 0) { > + netdev_err(priv->dev, "%s: Serdes powerup failed\n", > + __func__); > + goto init_error; > + } > + } Ok, so serdes is powered up here. > ret =3D stmmac_hw_setup(dev, true); > if (ret < 0) { > netdev_err(priv->dev, "%s: Hw setup failed\n", But this goes to init_error, and exits w/o powering serdes down. Error handling needs to be fixed AFAICT. Best regards, Pavel -- echo 'DENX Software Engineering GmbH, Managing Director: Wolfgang = Denk' echo 'HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Ger= many' --4Ckj6UjgE2iN1+kY Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRPfPO7r0eAhk010v0w5/Bqldv68gUCYzwH+wAKCRAw5/Bqldv6 8kD0AKC1PZqySUpyok9Fn8lkj0b6roq4qQCgurqBtEAAoTZG96L0TSCt2D1M1Ys= =v+0S -----END PGP SIGNATURE----- --4Ckj6UjgE2iN1+kY--