mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-03 12:34:19 +00:00
de8d5b50e2
Removed upstreamed: backport-5.15/807-v6.1-0003-nvmem-core-add-error-handling-for-dev_set_name.patch[1] bcm47xx/patches-5.15/070-net-bgmac-fix-BCM5358-support-by-setting-correct-fla.patch[2] Added fix: backport-5.15/883-0001-net-Remove-WARN_ON_ONCE-sk-sk_forward_alloc-from-sk_.patch[3] All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.95&id=14eea6449473c1f55e196cc104ba16d144465869 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.95&id=2603a5ca6223bb3a88814e2728335eec14f715ab 3. https://lore.kernel.org/stable/20230227211548.13923-1-kuniyu@amazon.com Build system: x86_64 Build-tested: bcm2711/RPi4B, filogic/xiaomi_redmi-router-ax6000-ubootmod Run-tested: bcm2711/RPi4B, filogic/xiaomi_redmi-router-ax6000-ubootmod Signed-off-by: John Audia <therealgraysky@proton.me>
38 lines
1.3 KiB
Diff
38 lines
1.3 KiB
Diff
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
|
|
@@ -3832,8 +3832,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 */
|
|
@@ -3845,6 +3843,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);
|
|
|