From: Divy Le Ray Date: Tue, 27 Nov 2007 21:30:15 +0000 (-0800) Subject: cxgb - fix NAPI X-Git-Tag: v2.6.24-rc4~9^2~10 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=445cf803ca757a5c43f4e11fdfba70355d510841;p=linux-2.6 cxgb - fix NAPI netif_rx_complete() should be called only when work_done < budget. Signed-off-by: Divy Le ray Signed-off-by: Jeff Garzik --- diff --git a/drivers/net/chelsio/sge.c b/drivers/net/chelsio/sge.c old mode 100755 new mode 100644 index e8b1036672..4b6258fc72 --- 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);