* [PATCH net] net: bcmgenet: Avoid sleeping in bcmgenet_timeout
@ 2015-08-21 1:04 Florian Fainelli
2015-08-24 5:59 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Florian Fainelli @ 2015-08-21 1:04 UTC (permalink / raw)
To: netdev; +Cc: davem, pgynther, jaedon.shin, Florian Fainelli
bcmgenet_timeout() executes in atomic context, yet we will invoke
napi_disable() which does sleep. Looking back at the changes, disabling
TX napi and re-enabling it is completely useless, since we reclaim all
TX buffers and re-enable interrupts, and wake up the TX queues.
Fixes: 13ea657806cf ("net: bcmgenet: improve TX timeout")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
Hi David,
Sorry this is caming very late, if this does not make it to 4.2, can you
queue this for the 4.2.1 stable tree when it shows up?
Thank you!
drivers/net/ethernet/broadcom/genet/bcmgenet.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
index 64c1e9db6b0b..12a020c105bb 100644
--- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
+++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
@@ -2820,8 +2820,6 @@ static void bcmgenet_timeout(struct net_device *dev)
netif_dbg(priv, tx_err, dev, "bcmgenet_timeout\n");
- bcmgenet_disable_tx_napi(priv);
-
for (q = 0; q < priv->hw_params->tx_queues; q++)
bcmgenet_dump_tx_queue(&priv->tx_rings[q]);
bcmgenet_dump_tx_queue(&priv->tx_rings[DESC_INDEX]);
@@ -2837,8 +2835,6 @@ static void bcmgenet_timeout(struct net_device *dev)
bcmgenet_intrl2_0_writel(priv, int0_enable, INTRL2_CPU_MASK_CLEAR);
bcmgenet_intrl2_1_writel(priv, int1_enable, INTRL2_CPU_MASK_CLEAR);
- bcmgenet_enable_tx_napi(priv);
-
dev->trans_start = jiffies;
dev->stats.tx_errors++;
--
2.1.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] net: bcmgenet: Avoid sleeping in bcmgenet_timeout
2015-08-21 1:04 [PATCH net] net: bcmgenet: Avoid sleeping in bcmgenet_timeout Florian Fainelli
@ 2015-08-24 5:59 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2015-08-24 5:59 UTC (permalink / raw)
To: f.fainelli; +Cc: netdev, pgynther, jaedon.shin
From: Florian Fainelli <f.fainelli@gmail.com>
Date: Thu, 20 Aug 2015 18:04:22 -0700
> bcmgenet_timeout() executes in atomic context, yet we will invoke
> napi_disable() which does sleep. Looking back at the changes, disabling
> TX napi and re-enabling it is completely useless, since we reclaim all
> TX buffers and re-enable interrupts, and wake up the TX queues.
>
> Fixes: 13ea657806cf ("net: bcmgenet: improve TX timeout")
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Applied, thanks Florian.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-08-24 6:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-21 1:04 [PATCH net] net: bcmgenet: Avoid sleeping in bcmgenet_timeout Florian Fainelli
2015-08-24 5:59 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).