Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 26823
b: refs/heads/master
c: 86fba63
h: refs/heads/master
i:
  26821: 4aafe16
  26819: 68d47b7
  26815: e361731
v: v3
  • Loading branch information
Stephen Hemminger authored and Jeff Garzik committed May 20, 2006
1 parent ea30c02 commit 8cab43b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 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: 86a31a759f2117816b8c78a049c41ead3ef9ef1c
refs/heads/master: 86fba6342dee30a1533b14da284d79e4eb66de26
16 changes: 11 additions & 5 deletions trunk/drivers/net/sky2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1919,6 +1919,12 @@ static inline void sky2_tx_done(struct net_device *dev, u16 last)
}
}

/* Is status ring empty or is there more to do? */
static inline int sky2_more_work(const struct sky2_hw *hw)
{
return (hw->st_idx != sky2_read16(hw, STAT_PUT_IDX));
}

/* Process status response ring */
static int sky2_status_intr(struct sky2_hw *hw, int to_do)
{
Expand Down Expand Up @@ -2191,19 +2197,19 @@ static int sky2_poll(struct net_device *dev0, int *budget)
if (status & Y2_IS_CHK_TXA2)
sky2_descriptor_error(hw, 1, "transmit", Y2_IS_CHK_TXA2);

if (status & Y2_IS_STAT_BMU)
sky2_write32(hw, STAT_CTRL, SC_STAT_CLR_IRQ);

work_done = sky2_status_intr(hw, work_limit);
*budget -= work_done;
dev0->quota -= work_done;

if (work_done >= work_limit)
if (status & Y2_IS_STAT_BMU)
sky2_write32(hw, STAT_CTRL, SC_STAT_CLR_IRQ);

if (sky2_more_work(hw))
return 1;

netif_rx_complete(dev0);

status = sky2_read32(hw, B0_Y2_SP_LISR);
sky2_read32(hw, B0_Y2_SP_LISR);
return 0;
}

Expand Down

0 comments on commit 8cab43b

Please sign in to comment.