Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp564318rwb; Fri, 4 Aug 2023 18:31:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF/LS1SN7cGFjfFsbO86tOq6oA8J2rcY/WAtQfHBRDdpgBEJTRJQCy6iC3N14sm7d/ct50+ X-Received: by 2002:a05:6a00:24d0:b0:666:7ec0:22d7 with SMTP id d16-20020a056a0024d000b006667ec022d7mr4433160pfv.24.1691199097216; Fri, 04 Aug 2023 18:31:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691199097; cv=none; d=google.com; s=arc-20160816; b=O3oItaKfVK43sUmpHo1s/96tZJoP8elto9ts9e0Meh0D4Fk3FCZVFmEtLfDHKUcM2G O0yHepCu2UG2P3fV9vsp1gmMudyhyskvu2EU4hcVTDFeY6qGW/TuS1LNT/wDlBJm6q44 kJn+e2YyyrOo2S5vq6ZxAcmJyiLoqouTL7FSFIbLWuhWTDV7F4jkc/gUK9CmFBli0s/k c25pGjyKBRLIkqos8r6PTy9iXe+TCIwDZ/nFWsIZSwUjkAZ+DS2HV5Dfj03qWH4co2tK ezkgigf3CaTZx7NY8TWTBmOQPpzqnLOl6gLLhNsHm/f0Hi9jIqOanheQCpqUzAVyARPI 4mwA== 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=Z85yAr9ygR49mY8rjDO0s+k4VK4gbZo4ggiBhhqGLBc=; fh=c4ivztRHZA6rMxfau+MVI21ExUE85xAN+75Wc6KMaEg=; b=Xq2BsWhqVzO27/4dA8yGc46GrOlaO9R8NTpFjqKjUi1thRWY+GVgKUlnY8yo7l+1ek 0J0botqeFPYqCjOWw1Srh0i0zZlGUwmw8F9j5MyDdK3UrBg4nWKgzEFFGtDurxo+4Pg3 IjjkCbo+wKx2BKAdJsN5fkjo9L9JUFTenmlfImqXZQ/aC+u9DiwcWaImOtcFWrxhkLn2 woYrJ3uJdrQW1S8P9JpP1plwXKKlJQgJth+jfkOCmF6plaDrGI+e7iUGFhOjOK9DrfYa vM8lDO2Hmb9mdH8tHAvlN5a2W/YD9HqWGUdXRCD+C64DsAovJNq1w+5vKG/lEkyRRJ/x kA0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lessconfused.com header.s=lessconfused header.b=exPRrngy; 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 c5-20020a656185000000b005526bd0c526si2419446pgv.641.2023.08.04.18.31.25; Fri, 04 Aug 2023 18:31:37 -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=@lessconfused.com header.s=lessconfused header.b=exPRrngy; 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 S229838AbjHDWTh (ORCPT + 99 others); Fri, 4 Aug 2023 18:19:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229522AbjHDWTg (ORCPT ); Fri, 4 Aug 2023 18:19:36 -0400 Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 22AA7E70 for ; Fri, 4 Aug 2023 15:19:35 -0700 (PDT) Received: by mail-pj1-x1029.google.com with SMTP id 98e67ed59e1d1-269304c135aso430353a91.3 for ; Fri, 04 Aug 2023 15:19:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lessconfused.com; s=lessconfused; t=1691187574; x=1691792374; 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=Z85yAr9ygR49mY8rjDO0s+k4VK4gbZo4ggiBhhqGLBc=; b=exPRrngy/Xjg/0z8oKkOelqiXWNej+LTTOqlHFXzJWkLXH0y93hSwg9u30WZLWI79j Tlpu7V5P7ZMiSL5/OwQc0nHT195XzeF632ka4WQqLyBI9aES/Fr17LaK05Ca+dye5eN+ Uo0zPgm8tGZZf7jWNvBH7Vj3zNA9JPftcqEvA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691187574; x=1691792374; 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=Z85yAr9ygR49mY8rjDO0s+k4VK4gbZo4ggiBhhqGLBc=; b=kGp3XCOBkRLKiXaWvZPBBrPEoHp8KtyAQRgIGtIkiFZN+HMRqBOOBtiSGhJ0kU5v2C CjaR+Q9R69mWGpIb9vyQSCinOUaKwH86Q6S0roERdiRujx+v2jDHCqvDdU7QZJiLRM2u +wcHDNRjxY3W+GX0/x4BJTk/U+qp8OTMFJfQiIizv30J7fpq370AlQFUznvtz30X0HlZ kn6SoY/YnjewujcjihjBkEqVvrXcya9YoxyjrhWkwSJnStORmmIiaRBALmGf+n3UwmW3 /9ZZWkqNd+7ldu7foIl7hio76U4gmqXQ3W8b2iOP0A7d1FWUcyokOf5DmHXrxP9rRBHl g2LQ== X-Gm-Message-State: AOJu0YxeajwRDXFElsmbEGFfuNaMCVQsZ2fd8v/gDFGBBCTxAxHkrVZW U4mfx12+Lw72qVqTu6MjGySEbpZr+iwUKi3BxuXyww== X-Received: by 2002:a17:90a:f00e:b0:262:e6d2:2d6 with SMTP id bt14-20020a17090af00e00b00262e6d202d6mr3027874pjb.47.1691187574564; Fri, 04 Aug 2023 15:19:34 -0700 (PDT) MIME-Version: 1.0 References: <36acaa5c-f41a-af88-78dd-cd3714301c12@linaro.org> In-Reply-To: <36acaa5c-f41a-af88-78dd-cd3714301c12@linaro.org> From: Da Xue Date: Fri, 4 Aug 2023 18:19:23 -0400 Message-ID: Subject: Re: [PATCH] net: phy: meson-gxl: implement meson_gxl_phy_resume() To: neil.armstrong@linaro.org Cc: Da Xue , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , 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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 On Fri, Aug 4, 2023 at 4:44=E2=80=AFAM Neil Armstrong wrote: > > Hi Da, > > On 04/08/2023 05:07, Da Xue wrote: > > After suspend and resume, the meson GXL internal PHY config needs to > > be initialized again or the carrier cannot be found. > > > > Signed-off-by: Luke Lu > > Reviewed-by: Da Xue > > > > --- > > 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 bb9b33b6b..c4a07e6f7 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; > > + > > + phy_clear_bits(phydev, MII_BMCR, BMCR_PDOWN); > > Call genphy_resume() instead. Sent v2. > > > + ret =3D meson_gxl_config_init(phydev); > > + if (ret) > > + return ret; > > + > > + return 0; > > +} > > Please re-indent this function. Ack, my apologies. I didn't read the excerpt about Gmail compose converting tabs to spaces. > > > + > > /* This function is provided to cope with the possible failures of th= is 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, > > }, { > > -- > > 2.39.2 > > Thanks, > Neil > > _______________________________________________ > linux-amlogic mailing list > linux-amlogic@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-amlogic