summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorDivy Le Ray <divy@chelsio.com>2007-11-27 13:30:15 -0800
committerJeff Garzik <jeff@garzik.org>2007-12-01 16:32:31 -0500
commit445cf803ca757a5c43f4e11fdfba70355d510841 (patch)
treea818c54ffbc86ebcaed523d84d7d99d2b5c98662 /drivers/net
parent7832ee034b6ef78aab020c9ec1348544cd65ccbd (diff)
downloadop-kernel-dev-445cf803ca757a5c43f4e11fdfba70355d510841.zip
op-kernel-dev-445cf803ca757a5c43f4e11fdfba70355d510841.tar.gz
cxgb - fix NAPI
netif_rx_complete() should be called only when work_done < budget. Signed-off-by: Divy Le ray <divy@chelsio.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net')
-rw-r--r--[-rwxr-xr-x]drivers/net/chelsio/sge.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/chelsio/sge.c b/drivers/net/chelsio/sge.c
index e8b1036..4b6258f 100755..100644
--- 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);
OpenPOWER on IntegriCloud