Skip to content

Commit

Permalink
bnx2: fixing a timout error due not refreshing TX timers correctly
Browse files Browse the repository at this point in the history
When running the following script on an active bnx2 interface:

while(true); do ifconfig ethX mtu 9000; ifconfig ethX mtu 1500; done

A timeout error appears and dumps the following stack:

NETDEV WATCHDOG: eth4 (bnx2): transmit queue 0 timed out
------------[ cut here ]------------
Badness at net/sched/sch_generic.c:261
<snip>

This patch just fixes the way that ->trans_start is refreshed.

Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com>
Acked-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Breno Leitao authored and David S. Miller committed Dec 19, 2009
1 parent 4773a47 commit e6bf95f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion drivers/net/bnx2.c
Original file line number Diff line number Diff line change
Expand Up @@ -654,9 +654,17 @@ bnx2_netif_stop(struct bnx2 *bp)
{
bnx2_cnic_stop(bp);
if (netif_running(bp->dev)) {
int i;

bnx2_napi_disable(bp);
netif_tx_disable(bp->dev);
bp->dev->trans_start = jiffies; /* prevent tx timeout */
/* prevent tx timeout */
for (i = 0; i < bp->dev->num_tx_queues; i++) {
struct netdev_queue *txq;

txq = netdev_get_tx_queue(bp->dev, i);
txq->trans_start = jiffies;
}
}
}

Expand Down

0 comments on commit e6bf95f

Please sign in to comment.