Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795618107; b=ww2xE3Ubx+u8yOYiAr/k3+rXAHJxxaXsY44woKoAIvQfcZOADp5e5SOPZzbt+1DrJk+c QXF7OYe78/un7ulwtFlpLen6EwOMTpxY7ivi0g90hLKJSg4mbPFLTd+MfnxgVv30H/0Fx LCEx0+AFyQZSJGJHDf+Nv4Z53nCCaZz5Z7Z9MUi93kQkiPmPWgGPRQB887WmjfmLzojMh ltjBPkwRsyNzW0Z6UCLm6PBY1wo24jXk2sX8m0TNfXGmiCj8/g61xjhfHoCJPUjTLAExD 4KNSvFQ/GDnl+CrdroOZ0BrwkiktBRbasD6MxZzsoGBwVfvOCi1TSSS4cbMtKRtIDiQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795618107; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=z8eszeMBrKJs7gBSnVVgKuxrqbsCnmrfBonCkjngLK8=; b=ieK7ZLuJpaxaasr8QbhZPCiTHw1s67ADyki/sty3Vqpywov/SgLcrijfOV3vZjfTkDTb TxKReJlG3w360l/50J/LHgXIZmgufRRrAuap4a4E5UkwlAZjbr2x7f/1NEA5oVSgRzOWN HwysYMXbf8ZXx6ITWK4DQSzSrBygucVEShCjNEgY7tJ9/rKJ8JUEAkthSxhraKQln7EMA MvJYSJjJ9c73uuabrxlhV//qXPfMMrBI7tNNhgG9vnEzwS9jZw4+V93PZNy0WoOtdD3CI Vao8KbRq78LjbYf5XkcUqUR6OSPPVZ8QuGtVZH6dPyqK/Uf1Oo0oAcECOkOry06QQbA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b="VjPiXo/W"; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3AC4F606A31E; Wed, 25 Nov 2026 14:48:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=VjPiXo/W Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1C8611F000CA; Wed, 25 Nov 2026 14:48:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1795618106; bh=z8eszeMBrKJs7gBSnVVgKuxrqbsCnmrfBonCkjngLK8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=VjPiXo/WaTXJV4/Zh9V56FOsX0qtqe0fXR2x44FteqGh3JQ2uNgBK8wgIfNb84o7b p7W5OWqh+OwsH7yCT0cdBUtQWVafJncfRtYkyFzYyY1z3zzZOd4rtYVnZjJ25bblZE VRFDEUYLUb9D6bgSdUs6EoKGDdgNK3ajTZuuVEtY= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Maxime Chevallier , Lorenzo Bianconi , Paolo Abeni , Sasha Levin Subject: [PATCH 7.3 0175/1005] net: stmmac: pass the desired EST enable state to est_configure() Date: Wed, 25 Nov 2026 15:25:13 +0100 Message-ID: <20261125143825.841476186@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261125143821.729802100@linuxfoundation.org> References: <20261125143821.729802100@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 7.3-stable review patch. If anyone has any objections, please let me know. ------------------ From: Lorenzo Bianconi [ Upstream commit e4f5b46dfb8ac27a822fa0b411bd4526abf5ba97 ] Pass the desired EST enable state explicitly to est_configure() instead of having it derive from cfg->enable. This decouples the hardware programming state from the priv->est->enable flag, which records whether the taprio offload is attached. No functional change intended: the callers keep toggling priv->est->enable around the EST programming, as before. Reviewed-by: Maxime Chevallier Signed-off-by: Lorenzo Bianconi Link: https://patch.msgid.link/20261029-stmmac-est-fixes-v5-2-85b830a795a9@oss.qualcomm.com Signed-off-by: Paolo Abeni Stable-dep-of: 23d96de472f7 ("net: stmmac: re-apply taprio offload in __stmmac_open() and stmmac_resume()") Signed-off-by: Sasha Levin --- drivers/net/ethernet/stmicro/stmmac/hwif.h | 2 +- drivers/net/ethernet/stmicro/stmmac/stmmac_est.c | 6 +++--- drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c | 4 ++-- drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/hwif.h b/drivers/net/ethernet/stmicro/stmmac/hwif.h index bfcc930fd831f..4c2d7b156ac0e 100644 --- a/drivers/net/ethernet/stmicro/stmmac/hwif.h +++ b/drivers/net/ethernet/stmicro/stmmac/hwif.h @@ -623,7 +623,7 @@ struct stmmac_mmc_ops { struct stmmac_est_ops { int (*configure)(struct stmmac_priv *priv, struct stmmac_est *cfg, - unsigned int ptp_rate); + unsigned int ptp_rate, bool enable); void (*irq_status)(struct stmmac_priv *priv, struct net_device *dev, struct stmmac_extra_stats *x, u32 txqcnt); }; diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_est.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_est.c index afc516059b897..f15d4d046aa74 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_est.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_est.c @@ -26,7 +26,7 @@ static int est_write(void __iomem *est_addr, u32 reg, u32 val, bool gcl) } static int est_configure(struct stmmac_priv *priv, struct stmmac_est *cfg, - unsigned int ptp_rate) + unsigned int ptp_rate, bool enable) { void __iomem *est_addr = priv->estaddr; int i, ret = 0; @@ -62,7 +62,7 @@ static int est_configure(struct stmmac_priv *priv, struct stmmac_est *cfg, ctrl |= ((NSEC_PER_SEC / ptp_rate) * EST_GMAC5_PTOV_MUL) << EST_GMAC5_PTOV_SHIFT; } - if (cfg->enable) + if (enable) ctrl |= EST_EEST | EST_SSWL | EST_DFBS; else ctrl &= ~EST_EEST; @@ -70,7 +70,7 @@ static int est_configure(struct stmmac_priv *priv, struct stmmac_est *cfg, writel(ctrl, est_addr + EST_CONTROL); /* Configure EST interrupt */ - if (cfg->enable) + if (enable) ctrl = EST_IECGCE | EST_IEHS | EST_IEHF | EST_IEBE | EST_IECC; else ctrl = 0; diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c index e54a3c8878265..9a32af00d7d2d 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c @@ -74,7 +74,7 @@ static int stmmac_adjust_time(struct ptp_clock_info *ptp, s64 delta) mutex_lock(&priv->est_lock); priv->est->enable = false; stmmac_est_configure(priv, priv, priv->est, - priv->plat->clk_ptp_rate); + priv->plat->clk_ptp_rate, false); mutex_unlock(&priv->est_lock); } @@ -105,7 +105,7 @@ static int stmmac_adjust_time(struct ptp_clock_info *ptp, s64 delta) priv->est->btr[1] = (u32)time.tv_sec; priv->est->enable = true; ret = stmmac_est_configure(priv, priv, priv->est, - priv->plat->clk_ptp_rate); + priv->plat->clk_ptp_rate, true); mutex_unlock(&priv->est_lock); if (ret) netdev_err(priv->dev, "failed to configure EST\n"); diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c index fc6ec39f2108b..c4daf014e885e 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c @@ -1090,7 +1090,7 @@ static int tc_taprio_configure(struct stmmac_priv *priv, tc_taprio_map_maxsdu_txq(priv, qopt); ret = stmmac_est_configure(priv, priv, priv->est, - priv->plat->clk_ptp_rate); + priv->plat->clk_ptp_rate, true); mutex_unlock(&priv->est_lock); if (ret) { netdev_err(priv->dev, "failed to configure EST\n"); @@ -1109,7 +1109,7 @@ static int tc_taprio_configure(struct stmmac_priv *priv, mutex_lock(&priv->est_lock); priv->est->enable = false; stmmac_est_configure(priv, priv, priv->est, - priv->plat->clk_ptp_rate); + priv->plat->clk_ptp_rate, false); /* Reset taprio status */ for (i = 0; i < priv->plat->tx_queues_to_use; i++) { priv->xstats.max_sdu_txq_drop[i] = 0; -- 2.53.0