Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 218409
b: refs/heads/master
c: b336369
h: refs/heads/master
i:
  218407: f17199e
v: v3
  • Loading branch information
Joshua Hoke authored and David S. Miller committed Oct 25, 2010
1 parent ab4df43 commit d401fb7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c6ce2f4b270cb1d4d6b6f4f692a12ca2fea13f3f
refs/heads/master: b336369c1e1ad88495895260a9068eb18bc48b6c
27 changes: 16 additions & 11 deletions trunk/drivers/net/macb.c
Original file line number Diff line number Diff line change
Expand Up @@ -515,14 +515,15 @@ static int macb_poll(struct napi_struct *napi, int budget)
(unsigned long)status, budget);

work_done = macb_rx(bp, budget);
if (work_done < budget)
if (work_done < budget) {
napi_complete(napi);

/*
* We've done what we can to clean the buffers. Make sure we
* get notified when new packets arrive.
*/
macb_writel(bp, IER, MACB_RX_INT_FLAGS);
/*
* We've done what we can to clean the buffers. Make sure we
* get notified when new packets arrive.
*/
macb_writel(bp, IER, MACB_RX_INT_FLAGS);
}

/* TODO: Handle errors */

Expand Down Expand Up @@ -550,12 +551,16 @@ static irqreturn_t macb_interrupt(int irq, void *dev_id)
}

if (status & MACB_RX_INT_FLAGS) {
/*
* There's no point taking any more interrupts
* until we have processed the buffers. The
* scheduling call may fail if the poll routine
* is already scheduled, so disable interrupts
* now.
*/
macb_writel(bp, IDR, MACB_RX_INT_FLAGS);

if (napi_schedule_prep(&bp->napi)) {
/*
* There's no point taking any more interrupts
* until we have processed the buffers
*/
macb_writel(bp, IDR, MACB_RX_INT_FLAGS);
dev_dbg(&bp->pdev->dev,
"scheduling RX softirq\n");
__napi_schedule(&bp->napi);
Expand Down

0 comments on commit d401fb7

Please sign in to comment.