Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760005AbXK0Vas (ORCPT ); Tue, 27 Nov 2007 16:30:48 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758956AbXK0VaW (ORCPT ); Tue, 27 Nov 2007 16:30:22 -0500 Received: from stargate.chelsio.com ([12.22.49.110]:31517 "EHLO stargate.chelsio.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758767AbXK0VaU (ORCPT ); Tue, 27 Nov 2007 16:30:20 -0500 From: Divy Le Ray Subject: [PATCH 2/3] cxgb - fix NAPI To: jeff@garzik.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, greearb@candelatech.com Date: Tue, 27 Nov 2007 13:30:15 -0800 Message-ID: <20071127213015.823.85994.stgit@speedy5> User-Agent: StGIT/0.12 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1192 Lines: 36 From: Divy Le Ray netif_rx_complete() should be called only when work_done < budget. Signed-off-by: Divy Le ray --- drivers/net/chelsio/sge.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/chelsio/sge.c b/drivers/net/chelsio/sge.c old mode 100755 new mode 100644 index e8b1036..4b6258f --- a/drivers/net/chelsio/sge.c +++ b/drivers/net/chelsio/sge.c @@ -1625,11 +1625,9 @@ int t1_poll(struct napi_struct *napi, int budget) { struct adapter *adapter = container_of(napi, struct adapter, napi); struct net_device *dev = adapter->port[0].dev; - int work_done; - - work_done = process_responses(adapter, budget); + int work_done = process_responses(adapter, budget); - if (likely(!responses_pending(adapter))) { + if (likely(work_done < budget)) { netif_rx_complete(dev, napi); writel(adapter->sge->respQ.cidx, adapter->regs + A_SG_SLEEPING); - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/