From patchwork Thu Mar 6 15:23:57 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: 14004683 X-Patchwork-Delegate: kuba@kernel.org Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [78.32.30.218]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F006F1624C8 for ; Thu, 6 Mar 2025 15:24:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=78.32.30.218 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741274665; cv=none; b=FLYjYGbkXjK1ynQ49WZK1xppnU0PXZbYBM6ftPEGpRilp+lvQcLBs0Jsn4QEZsE4mBdvuHRaBuvH0Gc6kPzk/+CjnLkfwjDG6q+i4b1AHJs1KPZRj9DCrUW24WofW3xzVAYKX2iWHggCMH9YM3Uuel3ywJHqJ0WlPksxVISCY4k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741274665; c=relaxed/simple; bh=2BgLe8zKjL1lF2NmWsoI6WXTc04lNfHWtGAqmYTQb10=; h=In-Reply-To:References:From:To:Cc:Subject:MIME-Version: Content-Disposition:Content-Type:Message-Id:Date; b=ptRNrzYCvUEkKVfRFjPU7eY76+KSqg1oNxtCwX19kWdFT2aFTKNkiDgE4HslLuoxIipPHZECtPESfyGhlt+ml2y3INBp/i83OsMJBKy0/D+2WkjkoBkPPnTrkik8BXymY7/P2dnS4ZcvCCeyKWzJNlp3jfnJEodj1wYikTnJtd4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk; spf=none smtp.mailfrom=armlinux.org.uk; dkim=pass (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b=RTn0a8A+; arc=none smtp.client-ip=78.32.30.218 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=armlinux.org.uk Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="RTn0a8A+" 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=1osmxLM0JPtN1QjPJqhrKT1uQMk9kT2l9BrM2YTPnUY=; b=RTn0a8A+Hzq3+ziFUCBoaSW9Ed 2wAN0+i9k/4vAN13PesmIcZsX697ts0SgZZWVEy4QPZnEKbutgeLeOOVIabcKi2C5WPrQ7uXGbBll Eh5MlD84xnyWZgJggLlRcIY1pO/Cq978SmslVCWWqnzD6nCCsRz+TJ8wOP4RzYWNwKl3oogfCI/p5 sy1fO16BhgEuLRFPbR09VHOXYeKimQO81p6r7nw0kdTXKs5CjDI7BfLA9L65pxdus4JciLViUbmgQ KPKLf732a+ZBpfM48oOCssNNAY9KgOOnLZUn1OGwsTM7wZw15LCaJkgmMkX0falSDih6rtJC4Un1H Uypn+EeQ==; Received: from e0022681537dd.dyn.armlinux.org.uk ([fd8f:7570:feb6:1:222:68ff:fe15:37dd]:58532 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 1tqD57-00065S-0l; Thu, 06 Mar 2025 15:24:17 +0000 Received: from rmk by rmk-PC.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1tqD4n-005Xx6-3l; Thu, 06 Mar 2025 15:23:57 +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 net-next v2 2/2] net: stmmac: block PHY rx clock-stop over reset Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline Message-Id: Sender: Russell King Date: Thu, 06 Mar 2025 15:23:57 +0000 X-Patchwork-Delegate: kuba@kernel.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 6924df893e42..037039a9a33b 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -3096,7 +3096,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;