Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp4914279rwb; Tue, 8 Aug 2023 16:33:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHDoJsFrltp8I9IVNfVos7hCnDerBF7t9E6sy7vED+NPUWK4bTDviJ2Qr7/7GFjf0ANM0BJ X-Received: by 2002:aa7:d3ca:0:b0:523:2919:635e with SMTP id o10-20020aa7d3ca000000b005232919635emr910467edr.14.1691537597888; Tue, 08 Aug 2023 16:33:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691537597; cv=none; d=google.com; s=arc-20160816; b=rR8ruVhKv5l32M8TvUyUNhph+QVecOwub9DraiCETDiEOp9WcTcjE3bHLz2VSCCvdC hd85+LgIO/vfc9iWQeBpCLpOnBzLdiFAE05oK2FeZX7uyqWr+SYg0+m0XT6yK2/reIjK uVcirjp75LmnIf1Fhr0hPdZZZXSckkmku4xc8Ju+DJ/m31AUrqAQwe1+8Q6scDmmuq6p m7BQsb33Ed208G666hxWvr9jO/r8nUNJK+5OgCjIu1BQRmrnk+Hhi26ClfokzLXUg74l GUb9KJoBHtCInR+lbC+CLg/sE+kfNcOCkXA6/TsJvuvjrfDF4upDRTKFWMtGku32iEUY cf2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=9qYerQWFf1ix5KHtY99MS4jSB8DQAs9co/lnQIZ+dhI=; fh=1lfnyZu5L76mKyhifNfWubENd9N+MuMBkyp6DAn/uds=; b=GM/UsKWW6rDJ87F/Ewo8JI6dAf+++Q2VnzY1q/JrZFRS2FwHpAwlyb4s+MG6d0amRg mAuWZTsd5uDhw8lhJnXeYF+e1cbvZ86mTvRrS+ZCbQyw39UzBXkWzL71mBLyEFQ0kZMI dZ6cHj4X4gFwlKqNp55pEzjCivYvUa3n0P1REzk369FvNrZFTT+643+cTg1wlL8tUYKb 0s4NEKjvnl+IrpL8GN4xE3ScRTZFDAQLyCSHYbiw5fN3MVxWL5V2WuyOX7cKQf2Pu6Ld jwWiHypeEdLIn+yvBNTQA0DG01wwRLfwWQC6UdUEHaYb4YLiiW8A7MyzPrfIN0e9FWZz 2jjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@libre.computer header.s=google header.b=FrNaFxjl; 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 k24-20020aa7d8d8000000b00522586f3b0asi8396979eds.85.2023.08.08.16.32.54; Tue, 08 Aug 2023 16:33:17 -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; dkim=pass header.i=@libre.computer header.s=google header.b=FrNaFxjl; 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 S230008AbjHHVtr (ORCPT + 99 others); Tue, 8 Aug 2023 17:49:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229715AbjHHVtp (ORCPT ); Tue, 8 Aug 2023 17:49:45 -0400 Received: from mail-lj1-x22b.google.com (mail-lj1-x22b.google.com [IPv6:2a00:1450:4864:20::22b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0778110D1 for ; Tue, 8 Aug 2023 14:49:44 -0700 (PDT) Received: by mail-lj1-x22b.google.com with SMTP id 38308e7fff4ca-2b9c55e0fbeso95333021fa.2 for ; Tue, 08 Aug 2023 14:49:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=libre.computer; s=google; t=1691531382; x=1692136182; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=9qYerQWFf1ix5KHtY99MS4jSB8DQAs9co/lnQIZ+dhI=; b=FrNaFxjlwpRFm2ZaqTEVKKumXjnd7ComOOWOZmrjXYgDYMvEXazM7CCXphzVh1/C/K NP5sjTK0dIQm0/9wGmf7nEwDV7Xk8f+T97AbHbMm4JkjPDfbkskBicWsAACfRTGKUHkG zuC69RP3+07PAyZhrHIpT6PPZ98X9xyJu+2DEkSGWP1HRqHeQ1YU8pWInTUVhylbG2g4 bzAC745EN5wdU3rCMBBBZT6q6cD2O+q2EGddA4xv+55YkHsb2lE90EoPvp2S73b9Wgfa bcZc3s1S6HVntugMBSpBUNjQUovF4F1LmIketV9E5WzR9zdf+AT9GddV1aRJ5XYi7wY+ qtzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691531382; x=1692136182; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9qYerQWFf1ix5KHtY99MS4jSB8DQAs9co/lnQIZ+dhI=; b=je+qXxxP2QwqBg3gmekJTTnxPC1nNyKkvWoAQM5ahPkfLscySlebkxbN/QJdbOdZs1 jRxWdrv4x+BAtR3N+6ZWb8n6l6uwsf38vm+KqXHIkLugE5YdunhJxm3L8U9ceSsZ17go oU35pLG3lkf5Zp4nz/fXwYZu2k6F4sfySCqkxoyZ84WzvhImXdr7hIBJqmM/9apJl2L7 8VURNCXFeU4NEjceGMjFaTgixU7dszerqUkaOpGKUnvX5ruIEzsRasLI8dMU62Y5JYRZ ZxYQJLcCyfncU4zAGrrarXza04ckY//8iYWkmNhQcm58mpezYSsrOLMtcfH8nByTjC/I 9+rw== X-Gm-Message-State: AOJu0Yy6A4bGSWbwkSf1AaKusMLU4atSQq0KpQtTONDUe/b090w/5rBZ kz4kWRxYTlmo8WLWz2MA85XHTqvzSoOeXZs9q69g9Q== X-Received: by 2002:a2e:9b86:0:b0:2b9:e501:a6a6 with SMTP id z6-20020a2e9b86000000b002b9e501a6a6mr563511lji.30.1691531381689; Tue, 08 Aug 2023 14:49:41 -0700 (PDT) MIME-Version: 1.0 References: <20230808050016.1911447-1-da@libre.computer> In-Reply-To: From: Luke Lu Date: Tue, 8 Aug 2023 21:49:30 +0000 Message-ID: Subject: Re: [PATCH v3] net: phy: meson-gxl: implement meson_gxl_phy_resume() To: Heiner Kallweit Cc: Da Xue , Andrew Lunn , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE,URIBL_BLOCKED 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 HI Heiner Kallweit: On Tue, Aug 8, 2023 at 6:42=E2=80=AFAM Heiner Kallweit wrote: > > On 08.08.2023 07:00, Da Xue wrote: > > After suspend and resume, the meson GXL internal PHY config needs to > > To avoid misunderstandings: > You mean suspend/resume just of the PHY, or of the system? > We found this issue during the test of whole system suspend/resume(including ethernet/network), so it's more proper to interpret as "the system" here > Description sounds like this patch is a fix and should go to stable. I agree it's worth the effort to push the patch to stable tree, but found a conflict with commit 69ff53e4a4c9 ("net: phy: meson-gxl: use MMD access dummy stubs for GXL, internal PHY") It will prevent maintainers doing a clean cherry-pick, we can slightly rework the patch and send it to the stable tree separately once this patch is accepted by mainli= ne. > So add a Fixes tag. Sure, as the issue is introduced with first resume(), so will add Fixes: 7334b3e47aee ("net: phy: Add Meson GXL Internal PHY driver") > And a formal remark: Your patch misses the net / net-next annotation. > Not sure if we understand this correctly, do you mean the one line summary of this patch? or the content of the commit message that needs to improve to reflect this = is an ethernet/net related fix? I'd appreciate if you can explain a little bit more, so we can better fix this, thanks > > be initialized again, otherwise the carrier cannot be found: > > > > eth0: mtu 1500 qdisc mq state > > DOWN group default qlen 1000 > > > > After the patch, resume: > > > > eth0: mtu 1500 qdisc mq state U= P > > group default qlen 1000 > > > > Signed-off-by: Luke Lu > > Signed-off-by: Da Xue > > --- > > Changes since v2: > > - fix missing parameter of genphy_resume() > > > > Changes since v1: > > - call generic genphy_resume() > > --- > > drivers/net/phy/meson-gxl.c | 14 +++++++++++++- > > 1 file changed, 13 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/net/phy/meson-gxl.c b/drivers/net/phy/meson-gxl.c > > index bb9b33b6bce2..bbad26b7c5a1 100644 > > --- a/drivers/net/phy/meson-gxl.c > > +++ b/drivers/net/phy/meson-gxl.c > > @@ -132,6 +132,18 @@ static int meson_gxl_config_init(struct phy_device= *phydev) > > return 0; > > } > > > > +static int meson_gxl_phy_resume(struct phy_device *phydev) > > +{ > > + int ret; > > + > > + genphy_resume(phydev); > > Return value of this function should be checked. > will fix in v4 > > + ret =3D meson_gxl_config_init(phydev); > > + if (ret) > > + return ret; > > + > > + return 0; > > +} > > + > > /* This function is provided to cope with the possible failures of thi= s phy > > * during aneg process. When aneg fails, the PHY reports that aneg is = done > > * but the value found in MII_LPA is wrong: > > @@ -196,7 +208,7 @@ static struct phy_driver meson_gxl_phy[] =3D { > > .config_intr =3D smsc_phy_config_intr, > > .handle_interrupt =3D smsc_phy_handle_interrupt, > > .suspend =3D genphy_suspend, > > - .resume =3D genphy_resume, > > + .resume =3D meson_gxl_phy_resume, > > .read_mmd =3D genphy_read_mmd_unsupported, > > .write_mmd =3D genphy_write_mmd_unsupported, > > }, { >