diff options
| author | Breno Leitao <leitao@linux.vnet.ibm.com> | 2009-12-18 23:35:34 -0500 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2009-12-18 23:35:34 -0500 |
| commit | e6bf95ffa8d6f8f4b7ee33ea01490d95b0bbeb6e (patch) | |
| tree | 6a361fa1fde7ac2ce613d5ad88ff9b688c02f5ad | |
| parent | 4773a47d8a564633cd80b94df397e91e946893e2 (diff) | |
bnx2: fixing a timout error due not refreshing TX timers correctly
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>
| -rw-r--r-- | drivers/net/bnx2.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index c3e2b279fca..f38764ec02c 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c | |||
| @@ -654,9 +654,17 @@ bnx2_netif_stop(struct bnx2 *bp) | |||
| 654 | { | 654 | { |
| 655 | bnx2_cnic_stop(bp); | 655 | bnx2_cnic_stop(bp); |
| 656 | if (netif_running(bp->dev)) { | 656 | if (netif_running(bp->dev)) { |
| 657 | int i; | ||
| 658 | |||
| 657 | bnx2_napi_disable(bp); | 659 | bnx2_napi_disable(bp); |
| 658 | netif_tx_disable(bp->dev); | 660 | netif_tx_disable(bp->dev); |
| 659 | bp->dev->trans_start = jiffies; /* prevent tx timeout */ | 661 | /* prevent tx timeout */ |
| 662 | for (i = 0; i < bp->dev->num_tx_queues; i++) { | ||
| 663 | struct netdev_queue *txq; | ||
| 664 | |||
| 665 | txq = netdev_get_tx_queue(bp->dev, i); | ||
| 666 | txq->trans_start = jiffies; | ||
| 667 | } | ||
| 660 | } | 668 | } |
| 661 | } | 669 | } |
| 662 | 670 | ||
