Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 1258
b: refs/heads/master
c: f7383c2
h: refs/heads/master
v: v3
  • Loading branch information
David S. Miller committed May 19, 2005
1 parent a305a23 commit f3c1cac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 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: 59e6b4343299373bc10dd131ab5142f53ddd838a
refs/heads/master: f7383c22246cfccbe912541dd83103009ed2b537
12 changes: 5 additions & 7 deletions trunk/drivers/net/tg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -2869,9 +2869,6 @@ static int tg3_poll(struct net_device *netdev, int *budget)

spin_lock_irqsave(&tp->lock, flags);

if (tp->tg3_flags & TG3_FLAG_TAGGED_STATUS)
tp->last_tag = sblk->status_tag;

/* handle link change and other phy events */
if (!(tp->tg3_flags &
(TG3_FLAG_USE_LINKCHG_REG |
Expand All @@ -2896,7 +2893,6 @@ static int tg3_poll(struct net_device *netdev, int *budget)
* All RX "locking" is done by ensuring outside
* code synchronizes with dev->poll()
*/
done = 1;
if (sblk->idx[0].rx_producer != tp->rx_rcb_ptr) {
int orig_budget = *budget;
int work_done;
Expand All @@ -2908,12 +2904,14 @@ static int tg3_poll(struct net_device *netdev, int *budget)

*budget -= work_done;
netdev->quota -= work_done;

if (work_done >= orig_budget)
done = 0;
}

if (tp->tg3_flags & TG3_FLAG_TAGGED_STATUS)
tp->last_tag = sblk->status_tag;
rmb();

/* if no more work, tell net stack and NIC we're done */
done = !tg3_has_work(tp);
if (done) {
spin_lock_irqsave(&tp->lock, flags);
__netif_rx_complete(netdev);
Expand Down

0 comments on commit f3c1cac

Please sign in to comment.