From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AE56BC001DE for ; Fri, 4 Aug 2023 20:19:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=dLkbZLevQ4kI/RFLzQLrxMbpothTK8HKuIAyyfesjEA=; b=bMRuCpw9HfKpBZ KrphJZHebAr5E8ECQyFfAhV/iUfC3oMdyC1eqjkLi4jPXdV/KE+cW2sDjdHBlea8ZLn5KoMQTbdr4 LS7/mRfNfssjQZH1DepRnrmJT9SReVnjxnBzgVRB14MAwk2WtS40fs0/yu0p+j5GIDtqKspUWMOtv n9m/QNEiy1vrIPjUiuEK49hbtRfBd4vUOZEGzhaMkPAJssuEW65OygLKz4KQGYNbKPH7olZxsGyPC YbknzpabHLKN+LHAFOvR1FCJBO1YeU7n6sR1KXRcHUvxm8xn3oxBH5sz+zkS/y8HOc1NaJ0PZSSzI jeVdhAG23WWuI7+kvk1g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qS1Ga-00DBMz-0D; Fri, 04 Aug 2023 20:19:20 +0000 Received: from mail-pl1-x662.google.com ([2607:f8b0:4864:20::662]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qS1GW-00DBLS-2Y for linux-arm-kernel@lists.infradead.org; Fri, 04 Aug 2023 20:19:17 +0000 Received: by mail-pl1-x662.google.com with SMTP id d9443c01a7336-1bba54f7eefso24251315ad.1 for ; Fri, 04 Aug 2023 13:19:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=libre.computer; s=google; t=1691180354; x=1691785154; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=LQFjBf7YtxXmJlSdHAu4ArmD+GnCH3KaGA7nl8cwkTs=; b=UtRNJsHxz1UB+ekhwkbt9C6Dtk5h5XbMoumFtaOzkQEv7IxKftbaDFQN+lTKl/AbZq bbotrbh+PtwAHlsbd7VATsfzrz4K1LmfvsCb3eTyJ03K6PP/cWp9eLArYWEztxFf9mZu qakKdMsiXit6f/0Nrst3iazklcxEc0oshWrHoAkQBb9D9X+VIECWWFqTVMAfKzLyijTz HQaJGrX0+fu0JdVokc6FczhJrI7skr833dGmXo9fTWsYTy7aaCN3wihbZeuCJfUgouab kiyKrKRSQ5MPhOmof8V8SGYdOb1EbVdrzpXF7MfbtyK1eh6+GIxlxUO2eZm3Kc5enz2s HEfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691180354; x=1691785154; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=LQFjBf7YtxXmJlSdHAu4ArmD+GnCH3KaGA7nl8cwkTs=; b=OLv+SPD8EoaHNc3SQ6TV4+WRdLdcBurrJLaqV8KQCe5WpDrEj/UvJlN32NuhG4ma4o vBT6oL9gC9EQtbv5VG13O/zKpeYtSSqDI7Cvmu+JGKSEl2xqe2Jc65wfABeC7oIxHcaE DX829rz+r2uO52UvTJ018di3tFNHRyFH644/C7Kyh+moyDg790G74lH7nFy5Q0UtwC57 k3peTdJJWnfyKTz1E1Pl4XZyxJID/JyNv0BiLMJpJSE9hdgmfUwTsQBw2olf7V0MWyIn lM9Rhlf2uoCKQ1Oo0On7eKbW5tXFEkYfBN6GKraZDOzggZyvAYoLO5stpP5pBVN7ORel Hdug== X-Gm-Message-State: AOJu0YyfLVUL4ITaWMVwskX/J+SrugAnRkT2vp+SpX6UiQvlKgREcN/e 9mEL1FuOOOjwspUxZ/1UynbQGzbCLFGOhxCO/PqXvs1ph3fM X-Google-Smtp-Source: AGHT+IG8HYHsBb1cwD/a6m826Y9iwPZnuIAKjiIHJsIkwHtJraIeAGfz9scoH18va3RFBbCIMIdNo+4mCugP X-Received: by 2002:a17:902:f551:b0:1bb:c7bc:ceb8 with SMTP id h17-20020a170902f55100b001bbc7bcceb8mr768160plf.22.1691180354378; Fri, 04 Aug 2023 13:19:14 -0700 (PDT) Received: from dxue-amd-5700g.libretech.co ([72.76.64.93]) by smtp-relay.gmail.com with ESMTPS id q7-20020a170902a3c700b001b9dbb0e802sm377270plb.137.2023.08.04.13.19.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Aug 2023 13:19:14 -0700 (PDT) X-Relaying-Domain: libre.computer From: Da Xue To: Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl Cc: Da Xue , Luke Lu , netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] [PATCH v2] net: phy: meson-gxl: implement meson_gxl_phy_resume() Date: Fri, 4 Aug 2023 16:19:02 -0400 Message-Id: <20230804201903.1303713-1-da@libre.computer> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230804_131916_825494_E9930123 X-CRM114-Status: GOOD ( 13.96 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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..2df516ed4 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(); + 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, }, { -- 2.39.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel