Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp4873013rwb; Tue, 8 Aug 2023 15:40:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFh9Qh+HgJMN3xtkMr3rT0qXBFzIUZ36Yz1elj3BDdpw45+eXTfvkOi5ZO58Gmbe9Eoy7K5 X-Received: by 2002:a05:6a20:938e:b0:11d:8a8f:655d with SMTP id x14-20020a056a20938e00b0011d8a8f655dmr1205847pzh.4.1691534426597; Tue, 08 Aug 2023 15:40:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691534426; cv=none; d=google.com; s=arc-20160816; b=rbt5CPTjbULso0jPpqM6EeVYizOjCHGrfPCuzCjfSSrUocObyTzh+RTrqOBXZtUIVt SjRVqibmrtHofj4a/vJNwf/Y67tNJYb/1Pk76hWks4WePbnUWsNzMHjU40H9+vWaVWIL SiWDW+uIalf8jzCxd7+1w1xy/glLxRos1l+djBLylog9hY2dCrljtkRTD4rgM49bcBPS bODW24IciGkMqPusahSZ8KAo+WUU6DC2pmw3msliBXtEmLrufh7IM2nZwtroukfXJ/u3 BAWfF8/IRuemChSMW+a1WFmK9KbaopAYezKu/eyWvPFsm54hZxyCg9dDlJfBfxCURkA5 Um6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=tDyaLCkG9Gwg7DW4JRUummSbEo/7bXQ3Usvl8gTviOs=; fh=2XoklzUwjNOLLZ1iNwg2qdnylt0bsX6dIOr8uFz3tVU=; b=wUGyUgPeWpyNPRtrz/X+sGDB7AptFjuUL7Yq2Sv0cDn6ROEcAFlOstRK571r9NWMzX ScW6WKLAI3xR/BXwyrmiai7qJ0/odldFUpyWsb1GK1+Dvo7WGh3kkAmALbHz58hGEQ+K DaySuB7CgtnaKO6aR+wobcp5R/TlmPV4HFkiGW3kp87SvvtNtKHm9YKg9lquZ8387qsO siWaC68AyI9JSbVZQAgFoVo1JGhZtO58bka3irkohoByU2y4rFS2MMqjIbJWXIe5rDnG L+VtZhkkueGRfiHqnJ5hES2Ts4oE7/k+43Rmf5DvBNEtTOGKLGtBosinQ6nGm4fWWz06 j50w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=AtDbmzdn; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s13-20020a632c0d000000b0055c96379d01si8055877pgs.705.2023.08.08.15.40.14; Tue, 08 Aug 2023 15:40:26 -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=@gmail.com header.s=20221208 header.b=AtDbmzdn; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230404AbjHHTtB (ORCPT + 99 others); Tue, 8 Aug 2023 15:49:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236525AbjHHTgc (ORCPT ); Tue, 8 Aug 2023 15:36:32 -0400 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B651863D68; Tue, 8 Aug 2023 10:10:03 -0700 (PDT) Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-4fe0fe622c3so9353992e87.2; Tue, 08 Aug 2023 10:10:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691514602; x=1692119402; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=tDyaLCkG9Gwg7DW4JRUummSbEo/7bXQ3Usvl8gTviOs=; b=AtDbmzdnGn7dyRGW9F343JoAWdkM6DRbid6MV1nwGXyzoCWRcj94OHz07KhU/FN+gi JpqPwrL7rnieULbj9eu//u2hJBdnClok9Bsqkanr/vlO2A9lWMlhgsbIMkVX1tWIbdxQ S/TkksaE3I5abgbBcY00Mo1mtTnKwwX0/BXfTmlP7l3kPDtWjBiMscz+KXEz/dFpvkz8 NNChvdSGAU8mB06XOrkuCJS6S9wNhKHBZxJO2uKsHPCcJyAUm4Glvuh0q15lXZLWwCoV ge5KPlTCuq1jVrg0/JLkp9m6mLk79eC3X50FZLu6wf0+Rxf7rf8gBbHNisP6mD0DG3ei r12Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691514602; x=1692119402; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=tDyaLCkG9Gwg7DW4JRUummSbEo/7bXQ3Usvl8gTviOs=; b=QqUJAfcriwgPV/EKVorg3sd9G8qDI/gpOQjUz0ISxnizqDYFSfzqxxyK7nHv7d/D+8 iNXl5SpyqfCc9MHcWl/xF46GGLAyh4OjT2CTpTZ+c3GCm+Oeird+ZGH8Db1st7wvL+xg DaK+ASrtxC0Nqa4ozVNtdBFKYna8HQ5hI9ycBdaIayeVGDv6xyTP/Fk+VL8OmMLE8OdG 4exE1oVlGqr4a9lta+ib6Jwp16TvLjLFKYm60NVnV3b2nCjBELrgZ3CbTCHKYbT4zJuI LhCV8rWZ48f+JFmO1s9DZ/mPX0Vc6FzekBXABTWR6N9yq02CJNFtQsTijDUVqygexsUB tJDA== X-Gm-Message-State: AOJu0Yx4mPtTD2TC4OSiysbUf10cIghv6XufzTvz/Ww2eZb8XU3AI2cj PsRoNC4XFHKPyOxONZNJoql8dgXC378= X-Received: by 2002:a17:906:31c7:b0:99b:55e3:bbd with SMTP id f7-20020a17090631c700b0099b55e30bbdmr9437027ejf.34.1691476953939; Mon, 07 Aug 2023 23:42:33 -0700 (PDT) Received: from ?IPV6:2a02:3100:9102:d500:25c8:948:5db6:241c? (dynamic-2a02-3100-9102-d500-25c8-0948-5db6-241c.310.pool.telefonica.de. [2a02:3100:9102:d500:25c8:948:5db6:241c]) by smtp.googlemail.com with ESMTPSA id fx15-20020a170906b74f00b0099c157cba46sm6142048ejb.119.2023.08.07.23.42.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 07 Aug 2023 23:42:33 -0700 (PDT) Message-ID: Date: Tue, 8 Aug 2023 08:42:31 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 Subject: Re: [PATCH v3] net: phy: meson-gxl: implement meson_gxl_phy_resume() To: Da Xue , Andrew Lunn , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl Cc: Luke Lu , netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org References: <20230808050016.1911447-1-da@libre.computer> Content-Language: en-US From: Heiner Kallweit In-Reply-To: <20230808050016.1911447-1-da@libre.computer> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,NICE_REPLY_A,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE, SPF_PASS 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 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? Description sounds like this patch is a fix and should go to stable. So add a Fixes tag. And a formal remark: Your patch misses the net / net-next annotation. > 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 UP > 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. > + ret = meson_gxl_config_init(phydev); > + if (ret) > + return ret; > + > + return 0; > +} > + > /* This function is provided to cope with the possible failures of this 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[] = { > .config_intr = smsc_phy_config_intr, > .handle_interrupt = smsc_phy_handle_interrupt, > .suspend = genphy_suspend, > - .resume = genphy_resume, > + .resume = meson_gxl_phy_resume, > .read_mmd = genphy_read_mmd_unsupported, > .write_mmd = genphy_write_mmd_unsupported, > }, {