From patchwork Fri Dec 2 09:48:20 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Igor_Maravi=C4=87?= X-Patchwork-Id: 128815 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 6F14EB6F69 for ; Fri, 2 Dec 2011 20:48:39 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753410Ab1LBJse (ORCPT ); Fri, 2 Dec 2011 04:48:34 -0500 Received: from mx1.etf.rs ([147.91.14.169]:49064 "EHLO mx1.etf.bg.ac.rs" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753312Ab1LBJsd (ORCPT ); Fri, 2 Dec 2011 04:48:33 -0500 Received: from localhost (avs2.etf.rs [147.91.14.173]) by mx1.etf.bg.ac.rs (Postfix) with ESMTP id A4B16120142; Fri, 2 Dec 2011 10:48:31 +0100 (CET) X-Virus-Scanned: amavisd-new at etf.rs Received: from mx2.etf.bg.ac.rs ([147.91.14.170]) by localhost (avs2.etf.rs [147.91.14.171]) (amavisd-new, port 10026) with ESMTP id 38CmYXNmUE1d; Fri, 2 Dec 2011 10:48:30 +0100 (CET) Received: from igor-PC.etf.bg.ac.rs (dhcp41.etf.bg.ac.rs [147.91.9.243]) by mx2.etf.bg.ac.rs (Postfix) with ESMTP id 683CC60121; Fri, 2 Dec 2011 10:48:30 +0100 (CET) From: igorm@etf.rs To: netdev@vger.kernel.org Cc: davem@davemloft.net, Igor Maravic Subject: [PATCH net-next] forcedeath: Fix bql support for forcedeath Date: Fri, 2 Dec 2011 10:48:20 +0100 Message-Id: <1322819300-14330-1-git-send-email-igorm@etf.rs> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: References: Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Igor Maravic 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 Acked-by: Eric Dumazet --- drivers/net/ethernet/nvidia/forcedeth.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/nvidia/forcedeth.c b/drivers/net/ethernet/nvidia/forcedeth.c index 5245dac..4c4e7f4 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) nv_tx_flip_ownership(dev); } - netdev_completed_queue(np->dev, tx_work, bytes_cleaned); - if (unlikely(np->get_tx.ex++ == np->last_tx.ex)) np->get_tx.ex = np->first_tx.ex; if (unlikely(np->get_tx_ctx++ == np->last_tx_ctx)) np->get_tx_ctx = np->first_tx_ctx; } + + netdev_completed_queue(np->dev, tx_work, bytes_cleaned); + if (unlikely((np->tx_stop == 1) && (np->get_tx.ex != orig_get_tx))) { np->tx_stop = 0; netif_wake_queue(dev);