aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/backport-5.15/775-v6.0-02-net-ethernet-stmicro-stmmac-first-disable-all-queues.patch
diff options
context:
space:
mode:
authorChristian Marangi <ansuelsmth@gmail.com>2022-09-13 19:04:12 +0200
committerChristian Marangi <ansuelsmth@gmail.com>2022-09-19 15:19:54 +0200
commit691b3dd35e3a0d32784f5295a535537b93726121 (patch)
tree82703d5492100bb11671fa67735e55e195c7b952 /target/linux/generic/backport-5.15/775-v6.0-02-net-ethernet-stmicro-stmmac-first-disable-all-queues.patch
parent7ace30aeb6ff58b4de845dd4722b281afd0c7eae (diff)
downloadupstream-691b3dd35e3a0d32784f5295a535537b93726121.tar.gz
upstream-691b3dd35e3a0d32784f5295a535537b93726121.tar.bz2
upstream-691b3dd35e3a0d32784f5295a535537b93726121.zip
generic: 5.15: backport stmmac patches to change MTU
Backport stmmac patches to change MTU while the interface is up. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Diffstat (limited to 'target/linux/generic/backport-5.15/775-v6.0-02-net-ethernet-stmicro-stmmac-first-disable-all-queues.patch')
-rw-r--r--target/linux/generic/backport-5.15/775-v6.0-02-net-ethernet-stmicro-stmmac-first-disable-all-queues.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/target/linux/generic/backport-5.15/775-v6.0-02-net-ethernet-stmicro-stmmac-first-disable-all-queues.patch b/target/linux/generic/backport-5.15/775-v6.0-02-net-ethernet-stmicro-stmmac-first-disable-all-queues.patch
new file mode 100644
index 0000000000..e73422636c
--- /dev/null
+++ b/target/linux/generic/backport-5.15/775-v6.0-02-net-ethernet-stmicro-stmmac-first-disable-all-queues.patch
@@ -0,0 +1,37 @@
+From 7028471edb646bfc532fec0973e50e784cdcb7c6 Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth@gmail.com>
+Date: Sat, 23 Jul 2022 16:29:30 +0200
+Subject: [PATCH 2/5] net: ethernet: stmicro: stmmac: first disable all queues
+ and disconnect in release
+
+Disable all queues and disconnect before tx_disable in stmmac_release to
+prevent a corner case where packet may be still queued at the same time
+tx_disable is called resulting in kernel panic if some packet still has
+to be processed.
+
+Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+---
+ drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
++++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+@@ -3808,8 +3808,6 @@ static int stmmac_release(struct net_dev
+ struct stmmac_priv *priv = netdev_priv(dev);
+ u32 chan;
+
+- netif_tx_disable(dev);
+-
+ if (device_may_wakeup(priv->device))
+ phylink_speed_down(priv->phylink, false);
+ /* Stop and disconnect the PHY */
+@@ -3821,6 +3819,8 @@ static int stmmac_release(struct net_dev
+ for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
+ hrtimer_cancel(&priv->tx_queue[chan].txtimer);
+
++ netif_tx_disable(dev);
++
+ /* Free the IRQ lines */
+ stmmac_free_irq(dev, REQ_IRQ_ERR_ALL, 0);
+