From mboxrd@z Thu Jan 1 00:00:00 1970 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 80C9A352071; Tue, 9 Sep 2025 16:47:39 +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=1757436461; cv=none; b=DTX7NDRSlG0aXhT+TOj3Fl9ZeO63vUUUlrWRMiYxCRGKA9GE2LZgj0bx2Hxki9wV8Oie+VZOXtPtTPyOw/rmLozlmVsFUpbcdcQqCE8w5BZECEML9QFBUM9JCnOBvgXtqUk6ZGDvFvmCNTVHHUQiiAembFyrmpe+FiwJQ9dpzPM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757436461; c=relaxed/simple; bh=N5viMDQy19vwDSoWQyr0LaNoQfkLi/JY5N7ezyuoiAA=; h=In-Reply-To:References:From:To:Cc:Subject:MIME-Version: Content-Disposition:Content-Type:Message-Id:Date; b=K6EK0M7b+4a0TNg8yrLsUfdWbE3PQLph1hdZlB7c173u0rG1Efzms1MdBIH3SpporPEdROgPc1uf+cs+vxmygDCAJksqfAZDor2Cl1kwn543HK0sKXPyVi3JLhDSpPX10escNYNSAK7JhUDFVQ+srd9jHa+CbMZhbd6tujFFdKA= 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=xC1ZIBzs; 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="xC1ZIBzs" 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=vg1aq5qDSmaUSi9KMu/jv/ZYN99u81NnP+NdqomBbrI=; b=xC1ZIBzs+a/vYd7TcC4mZXjpU/ 8BNoKrgPhfw6F0mjfGYj0BsWubtDNxnpz4rKNd9JnJKa3OHeXWuJPji9xbqMzrh/f8b8CE995zERn a0bIvkUCmQVxrX90C9/FjbY25ZXE5PQbfEpPI/gV1FWkfFBBtGsfDTQDvlUFfOacB9khRXs+xx7kC 8qRiG9J8MJqEZBtcv+SdnwqUkw/tzMESxePdQv9ZPeazrz5CVDVR1MK6pmvfH6dWF8UgAPeWwT2IW K9gq4jXQOkIRQQUf7qRlQwLyX/JbBiUcPjg6l+66ZrCzAMBVKLfc81uGZozzqppaxw9GtM1a67qjG xka0YRog==; Received: from e0022681537dd.dyn.armlinux.org.uk ([fd8f:7570:feb6:1:222:68ff:fe15:37dd]:44320 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.98.2) (envelope-from ) id 1uw1VH-000000008VP-0MfS; Tue, 09 Sep 2025 17:47:35 +0100 Received: from rmk by rmk-PC.armlinux.org.uk with local (Exim 4.98.2) (envelope-from ) id 1uw1VG-00000004MBw-09tK; Tue, 09 Sep 2025 17:47:34 +0100 In-Reply-To: References: From: "Russell King (Oracle)" To: Andrew Lunn , Heiner Kallweit Cc: Alexandre Torgue , Alexei Starovoitov , Andrew Lunn , bpf@vger.kernel.org, Daniel Borkmann , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Jesper Dangaard Brouer , John Fastabend , linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, Maxime Coquelin , netdev@vger.kernel.org, Paolo Abeni , Richard Cochran , Stanislav Fomichev Subject: [PATCH net-next 02/11] net: stmmac: disable PTP clock after unregistering PTP Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" Message-Id: Sender: Russell King Date: Tue, 09 Sep 2025 17:47:34 +0100 Follow the principle of unpublish from userspace and then teardown resources. Disable the PTP clock only after unregistering with the PTP subsystem, which ensures that we only stop the clock that ticks the timesource after we have removed the PTP device. Signed-off-by: Russell King (Oracle) --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 419cb49ee5a2..5d76cf7957ab 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -817,8 +817,8 @@ static int stmmac_init_ptp(struct stmmac_priv *priv) static void stmmac_release_ptp(struct stmmac_priv *priv) { - clk_disable_unprepare(priv->plat->clk_ptp_ref); stmmac_ptp_unregister(priv); + clk_disable_unprepare(priv->plat->clk_ptp_ref); } /** -- 2.47.3