From: Sasha Levin Date: Thu, 2 Sep 2021 13:50:35 +0000 (-0400) Subject: Fix up net-stmmac-add-mutex-lock-to-protect-est-parameters.patch on 5.10 X-Git-Tag: v4.4.283~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=64f081b01c70f657b660b8e0c6d71d6502172f70;p=thirdparty%2Fkernel%2Fstable-queue.git Fix up net-stmmac-add-mutex-lock-to-protect-est-parameters.patch on 5.10 Signed-off-by: Sasha Levin --- diff --git a/queue-5.10/net-stmmac-add-mutex-lock-to-protect-est-parameters.patch b/queue-5.10/net-stmmac-add-mutex-lock-to-protect-est-parameters.patch index f829c9c3d42..e63e9711155 100644 --- a/queue-5.10/net-stmmac-add-mutex-lock-to-protect-est-parameters.patch +++ b/queue-5.10/net-stmmac-add-mutex-lock-to-protect-est-parameters.patch @@ -1,4 +1,4 @@ -From 94c442a8f2c6ef87b31b855106753ddaaa39d72d Mon Sep 17 00:00:00 2001 +From 0f2d8e3d01ee074f7bf4e255f6a21502d75b29e2 Mon Sep 17 00:00:00 2001 From: Sasha Levin Date: Mon, 5 Jul 2021 18:26:54 +0800 Subject: net: stmmac: add mutex lock to protect est parameters @@ -12,14 +12,15 @@ EST parameters can be updated by other threads. Signed-off-by: Xiaoliang Yang Signed-off-by: David S. Miller +Signed-off-by: Pavel Machek (CIP) Signed-off-by: Sasha Levin --- - drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c | 13 ++++++++++++- + drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c | 14 +++++++++++++- include/linux/stmmac.h | 1 + - 2 files changed, 13 insertions(+), 1 deletion(-) + 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c -index 40dc14d1415f..8c2eae2a7efd 100644 +index 40dc14d1415f..6bd9f0c50ffe 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c @@ -689,14 +689,18 @@ static int tc_setup_taprio(struct stmmac_priv *priv, @@ -49,7 +50,7 @@ index 40dc14d1415f..8c2eae2a7efd 100644 /* Adjust for real system time */ priv->ptp_clock_ops.gettime64(&priv->ptp_clock_ops, ¤t_time); current_time_ns = timespec64_to_ktime(current_time); -@@ -751,8 +756,10 @@ static int tc_setup_taprio(struct stmmac_priv *priv, +@@ -751,19 +756,23 @@ static int tc_setup_taprio(struct stmmac_priv *priv, priv->plat->est->ctr[0] = do_div(ctr, NSEC_PER_SEC); priv->plat->est->ctr[1] = (u32)ctr; @@ -61,7 +62,12 @@ index 40dc14d1415f..8c2eae2a7efd 100644 ret = stmmac_fpe_configure(priv, priv->ioaddr, priv->plat->tx_queues_to_use, -@@ -764,6 +771,7 @@ static int tc_setup_taprio(struct stmmac_priv *priv, + priv->plat->rx_queues_to_use, fpe); + if (ret && fpe) { ++ mutex_unlock(&priv->plat->est->lock); + netdev_err(priv->dev, "failed to enable Frame Preemption\n"); + return ret; + } ret = stmmac_est_configure(priv, priv->ioaddr, priv->plat->est, priv->plat->clk_ptp_rate); @@ -69,7 +75,7 @@ index 40dc14d1415f..8c2eae2a7efd 100644 if (ret) { netdev_err(priv->dev, "failed to configure EST\n"); goto disable; -@@ -773,9 +781,12 @@ static int tc_setup_taprio(struct stmmac_priv *priv, +@@ -773,9 +782,12 @@ static int tc_setup_taprio(struct stmmac_priv *priv, return 0; disable: