From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: bin.lan.cn@eng.windriver.com, Sasha Levin <sashal@kernel.org>
Subject: Re: [PATCH 6.1] net: stmmac: move the EST lock to struct stmmac_priv
Date: Tue, 10 Dec 2024 14:25:15 -0500 [thread overview]
Message-ID: <20241210092312-6ea3adf627e2d3d6@stable.kernel.org> (raw)
In-Reply-To: <20241210020043.2545261-1-bin.lan.cn@eng.windriver.com>
[ Sasha's backport helper bot ]
Hi,
The upstream commit SHA1 provided is correct: 36ac9e7f2e5786bd37c5cd91132e1f39c29b8197
WARNING: Author mismatch between patch and upstream commit:
Backport author: bin.lan.cn@eng.windriver.com
Commit author: Xiaolei Wang <xiaolei.wang@windriver.com>
Status in newer kernel trees:
6.12.y | Present (exact SHA1)
6.6.y | Present (different SHA1: b538fefeb102)
6.1.y | Not found
Note: The patch differs from the upstream commit:
---
1: 36ac9e7f2e578 ! 1: 5bc5febe7e329 net: stmmac: move the EST lock to struct stmmac_priv
@@ Metadata
## Commit message ##
net: stmmac: move the EST lock to struct stmmac_priv
+ [ Upstream commit 36ac9e7f2e5786bd37c5cd91132e1f39c29b8197 ]
+
Reinitialize the whole EST structure would also reset the mutex
lock which is embedded in the EST structure, and then trigger
the following warning. To address this, move the lock to struct
@@ Commit message
Reviewed-by: Andrew Halaney <ahalaney@redhat.com>
Link: https://lore.kernel.org/r/20240513014346.1718740-2-xiaolei.wang@windriver.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+ [ Resolve line conflicts ]
+ Signed-off-by: Bin Lan <bin.lan.cn@windriver.com>
## drivers/net/ethernet/stmicro/stmmac/stmmac.h ##
@@ drivers/net/ethernet/stmicro/stmmac/stmmac.h: struct stmmac_priv {
@@ drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c: static int stmmac_adjust_time(
- mutex_lock(&priv->plat->est->lock);
+ mutex_lock(&priv->est_lock);
priv->plat->est->enable = false;
- stmmac_est_configure(priv, priv, priv->plat->est,
+ stmmac_est_configure(priv, priv->ioaddr, priv->plat->est,
priv->plat->clk_ptp_rate);
- mutex_unlock(&priv->plat->est->lock);
+ mutex_unlock(&priv->est_lock);
@@ drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c: static int stmmac_adjust_time(
time.tv_nsec = priv->plat->est->btr_reserve[0];
@@ drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c: static int stmmac_adjust_time(struct ptp_clock_info *ptp, s64 delta)
priv->plat->est->enable = true;
- ret = stmmac_est_configure(priv, priv, priv->plat->est,
+ ret = stmmac_est_configure(priv, priv->ioaddr, priv->plat->est,
priv->plat->clk_ptp_rate);
- mutex_unlock(&priv->plat->est->lock);
+ mutex_unlock(&priv->est_lock);
@@ drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c: static int stmmac_adjust_time(
}
## drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c ##
-@@ drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c: static int tc_taprio_configure(struct stmmac_priv *priv,
+@@ drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c: static int tc_setup_taprio(struct stmmac_priv *priv,
if (!plat->est)
return -ENOMEM;
@@ drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c: static int tc_taprio_configure(
- mutex_lock(&priv->plat->est->lock);
+ mutex_lock(&priv->est_lock);
priv->plat->est->gcl_size = size;
- priv->plat->est->enable = qopt->cmd == TAPRIO_CMD_REPLACE;
+ priv->plat->est->enable = qopt->enable;
- mutex_unlock(&priv->plat->est->lock);
+ mutex_unlock(&priv->est_lock);
for (i = 0; i < size; i++) {
s64 delta_ns = qopt->entries[i].interval;
-@@ drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c: static int tc_taprio_configure(struct stmmac_priv *priv,
+@@ drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c: static int tc_setup_taprio(struct stmmac_priv *priv,
priv->plat->est->gcl[i] = delta_ns | (gates << wid);
}
@@ drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c: static int tc_taprio_configure(
/* Adjust for real system time */
priv->ptp_clock_ops.gettime64(&priv->ptp_clock_ops, ¤t_time);
current_time_ns = timespec64_to_ktime(current_time);
-@@ drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c: static int tc_taprio_configure(struct stmmac_priv *priv,
- tc_taprio_map_maxsdu_txq(priv, qopt);
+@@ drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c: static int tc_setup_taprio(struct stmmac_priv *priv,
+ priv->plat->est->ctr[1] = (u32)ctr;
if (fpe && !priv->dma_cap.fpesel) {
- mutex_unlock(&priv->plat->est->lock);
@@ drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c: static int tc_taprio_configure(
return -EOPNOTSUPP;
}
-@@ drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c: static int tc_taprio_configure(struct stmmac_priv *priv,
+@@ drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c: static int tc_setup_taprio(struct stmmac_priv *priv,
- ret = stmmac_est_configure(priv, priv, priv->plat->est,
+ ret = stmmac_est_configure(priv, priv->ioaddr, priv->plat->est,
priv->plat->clk_ptp_rate);
- mutex_unlock(&priv->plat->est->lock);
+ mutex_unlock(&priv->est_lock);
if (ret) {
netdev_err(priv->dev, "failed to configure EST\n");
goto disable;
-@@ drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c: static int tc_taprio_configure(struct stmmac_priv *priv,
+@@ drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c: static int tc_setup_taprio(struct stmmac_priv *priv,
disable:
if (priv->plat->est) {
- mutex_lock(&priv->plat->est->lock);
+ mutex_lock(&priv->est_lock);
priv->plat->est->enable = false;
- stmmac_est_configure(priv, priv, priv->plat->est,
+ stmmac_est_configure(priv, priv->ioaddr, priv->plat->est,
priv->plat->clk_ptp_rate);
-@@ drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c: static int tc_taprio_configure(struct stmmac_priv *priv,
- priv->xstats.max_sdu_txq_drop[i] = 0;
- priv->xstats.mtl_est_txq_hlbf[i] = 0;
- }
- mutex_unlock(&priv->plat->est->lock);
+ mutex_unlock(&priv->est_lock);
}
---
Results of testing on various branches:
| Branch | Patch Apply | Build Test |
|---------------------------|-------------|------------|
| stable/linux-6.1.y | Success | Success |
next prev parent reply other threads:[~2024-12-10 19:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-10 2:00 [PATCH 6.1] net: stmmac: move the EST lock to struct stmmac_priv bin.lan.cn
2024-12-10 19:25 ` Sasha Levin [this message]
2024-12-11 8:11 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241210092312-6ea3adf627e2d3d6@stable.kernel.org \
--to=sashal@kernel.org \
--cc=bin.lan.cn@eng.windriver.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox