From patchwork Tue Mar 4 10:53:31 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Russell King (Oracle)" X-Patchwork-Id: 14000589 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 5E9F0C021B8 for ; Tue, 4 Mar 2025 12:08:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Date:Message-Id:Content-Type :Content-Transfer-Encoding:MIME-Version:Subject:Cc:To:From:References: In-Reply-To:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Q7/Gww1ENpC837SwvsCTFVZ9QRakJWgHkP5LP1staZE=; b=0iQsDvcpF5B763PDQTPMeMHm8K V6yf7gyapROkNT9oXu+tx8yXCACMW8nGz32q+yKLt+yBoQvyFnC271IF5x57aGN3luPfp5RkTfohv 0DEROC2MJoq52Q3ium5/JXm0L4k7NjxbK56cZfey9pB9v25YqXsZhIH/1BYkuRHp22v9kGasYuBrC 5ERkU9nESJLLmBO4bUR1Yy2ZKr2t18FFX9TbCJJzffz1/dR8hnVDjhlUkUBFQb6cgNBQiX0F+Orlo LmDXb4KkyD5zV6GLB0noQwA0VPbxVHmYebebDdKj+lfJKDTajyj8Bs51oQR4ActrLzVEsRgEzMTFX q75vvNpg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tpR4q-00000004Wf7-1ndm; Tue, 04 Mar 2025 12:08:48 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tpPuO-00000004HnK-2ozG for linux-arm-kernel@lists.infradead.org; Tue, 04 Mar 2025 10:53:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Date:Sender:Message-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:Subject:Cc:To:From:References: In-Reply-To:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Q7/Gww1ENpC837SwvsCTFVZ9QRakJWgHkP5LP1staZE=; b=lh4ka0NkLMEHSTKSrqmdmbio09 RtIq+fIX4+c0G4Ld2OwqnZLUbJVoSjxq7DoAT/7iP7m5MJAk4/55GOGkaf8e8b6/gVNL7V7x3S90d Q2ifwzUQ94Ien7pTBC1ljckaiqCLujdK/s1Z6/qW1G1I07iTKbpwHN3R1ty8FdNaremJKCmonVpL+ +KwEeSP1UNkW4QmG0VfdgAjcZ4ds+RyIbHoxoLVrn/arhYW4MUFxGGZr5NdD8Uk12qyF7epuBEbyM RjFXtifnTrrtGEqyKW2zbKuWk+UTMUa1UZO7sM817gwMF/scdORig4eyz9M22V/p6qnbT8rz/l+io QtGxV0vQ==; Received: from e0022681537dd.dyn.armlinux.org.uk ([fd8f:7570:feb6:1:222:68ff:fe15:37dd]:53422 helo=rmk-PC.armlinux.org.uk) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tpPuJ-0002VG-29; Tue, 04 Mar 2025 10:53:51 +0000 Received: from rmk by rmk-PC.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1tpPtz-005Soh-EG; Tue, 04 Mar 2025 10:53:31 +0000 In-Reply-To: References: From: "Russell King (Oracle)" To: Jon Hunter , Thierry Reding , "Lad, Prabhakar" Cc: Alexandre Torgue , Andrew Lunn , Andrew Lunn , "David S. Miller" , Eric Dumazet , Heiner Kallweit , Jakub Kicinski , linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, Maxime Coquelin , netdev@vger.kernel.org, Paolo Abeni Subject: [PATCH RFC net-next 3/3] net: stmmac: block PHY rx clock-stop over reset MIME-Version: 1.0 Content-Disposition: inline Message-Id: Date: Tue, 04 Mar 2025 10:53:31 +0000 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250304_025356_715772_5F629F77 X-CRM114-Status: UNSURE ( 9.04 ) X-CRM114-Notice: Please train this message. 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Signed-off-by: Russell King (Oracle) --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index aec230353ac4..21026ea7541c 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -3097,7 +3097,10 @@ static int stmmac_init_dma_engine(struct stmmac_priv *priv) if (priv->extend_desc && (priv->mode == STMMAC_RING_MODE)) priv->plat->dma_cfg->atds = 1; + /* Note that the PHY clock must be running for reset to complete. */ + phylink_rx_clk_stop_block(priv->phylink); ret = stmmac_reset(priv, priv->ioaddr); + phylink_rx_clk_stop_unblock(priv->phylink); if (ret) { netdev_err(priv->dev, "Failed to reset the dma\n"); return ret;