* [PATCH 2/3] cxgb - fix NAPI
@ 2007-11-27 21:30 Divy Le Ray
0 siblings, 0 replies; only message in thread
From: Divy Le Ray @ 2007-11-27 21:30 UTC (permalink / raw)
To: jeff; +Cc: netdev, linux-kernel, greearb
From: Divy Le Ray <divy@chelsio.com>
netif_rx_complete() should be called only
when work_done < budget.
Signed-off-by: Divy Le ray <divy@chelsio.com>
---
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);
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2007-11-27 21:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-27 21:30 [PATCH 2/3] cxgb - fix NAPI Divy Le Ray
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).