aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgor Maravic <igorm@etf.rs>2011-12-01 18:48:20 -0500
committerDavid S. Miller <davem@davemloft.net>2011-12-02 12:39:12 -0500
commit7505afe28c16a8d386624930a018d0052c75d687 (patch)
tree8b265a9d687e75267ea3b114228e44b8716e8079
parent1d214fa34fc7878d90e0963f9eb4895510db5e48 (diff)
forcedeath: Fix bql support for forcedeath
Moved netdev_completed_queue() out of while loop in function nv_tx_done_optimized(). Because this function was in while loop, BUG_ON(count > dql->num_queued - dql->num_completed) was hit in dql_completed(). Signed-off-by: Igor Maravic <igorm@etf.rs> Acked-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/nvidia/forcedeth.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/ethernet/nvidia/forcedeth.c b/drivers/net/ethernet/nvidia/forcedeth.c
index 5245dacc3a49..4c4e7f458383 100644
--- a/drivers/net/ethernet/nvidia/forcedeth.c
+++ b/drivers/net/ethernet/nvidia/forcedeth.c
@@ -2561,13 +2561,14 @@ static int nv_tx_done_optimized(struct net_device *dev, int limit)
2561 nv_tx_flip_ownership(dev); 2561 nv_tx_flip_ownership(dev);
2562 } 2562 }
2563 2563
2564 netdev_completed_queue(np->dev, tx_work, bytes_cleaned);
2565
2566 if (unlikely(np->get_tx.ex++ == np->last_tx.ex)) 2564 if (unlikely(np->get_tx.ex++ == np->last_tx.ex))
2567 np->get_tx.ex = np->first_tx.ex; 2565 np->get_tx.ex = np->first_tx.ex;
2568 if (unlikely(np->get_tx_ctx++ == np->last_tx_ctx)) 2566 if (unlikely(np->get_tx_ctx++ == np->last_tx_ctx))
2569 np->get_tx_ctx = np->first_tx_ctx; 2567 np->get_tx_ctx = np->first_tx_ctx;
2570 } 2568 }
2569
2570 netdev_completed_queue(np->dev, tx_work, bytes_cleaned);
2571
2571 if (unlikely((np->tx_stop == 1) && (np->get_tx.ex != orig_get_tx))) { 2572 if (unlikely((np->tx_stop == 1) && (np->get_tx.ex != orig_get_tx))) {
2572 np->tx_stop = 0; 2573 np->tx_stop = 0;
2573 netif_wake_queue(dev); 2574 netif_wake_queue(dev);