Skip to content

Commit

Permalink
net: bcmgenet: Avoid sleeping in bcmgenet_timeout
Browse files Browse the repository at this point in the history
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: 13ea657 ("net: bcmgenet: improve TX timeout")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
ffainelli authored and davem330 committed Aug 24, 2015
1 parent c953e23 commit eed6356
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions drivers/net/ethernet/broadcom/genet/bcmgenet.c
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand All @@ -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++;
Expand Down

0 comments on commit eed6356

Please sign in to comment.