mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-22 15:02:32 +00:00
9110126620
Removed upstreamed: generic/pending-5.15/722-net-mt7531-only-do-PLL-once-after-the-reset.patch[1] bcm53xx/patches-5.15/082-v6.0-clk-iproc-Do-not-rely-on-node-name-for-correct-PLL-s.patch[2] All other patches automatically rebased Build system: x86_64 Build-tested: bcm2711/RPi4B, mt7622/RT3200, mvebu/cortexa72 Run-tested: bcm2711/RPi4B, mt7622/RT3200, mvebu/cortexa72 (RB5009UG+S+IN) 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.72&id=5de02ab84aeca765da0e4d8e999af35325ac67c2 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.72&id=ab5c5787ab5ecdc4a7ea20b4ef542579e1beb49d 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
|
|
@@ -3818,8 +3818,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 */
|
|
@@ -3831,6 +3829,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);
|
|
|