Skip to content

Commit

Permalink
cxgb - fix NAPI
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Divy Le Ray authored and Jeff Garzik committed Dec 1, 2007
1 parent 7832ee0 commit 445cf80
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/net/chelsio/sge.c
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 445cf80

Please sign in to comment.