Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 67698
b: refs/heads/master
c: 6dee642
h: refs/heads/master
v: v3
  • Loading branch information
Michael Chan authored and David S. Miller committed Oct 12, 2007
1 parent 7d11bb2 commit 5e9d062
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 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: 4fd7ab5949edfdf99be0ceef206c9d0b7f186318
refs/heads/master: 6dee6421581d3484e9a01d403dbf158161942db6
16 changes: 10 additions & 6 deletions trunk/drivers/net/bnx2.c
Original file line number Diff line number Diff line change
Expand Up @@ -2652,10 +2652,10 @@ static int bnx2_poll_work(struct bnx2 *bp, int work_done, int budget)
REG_RD(bp, BNX2_HC_COMMAND);
}

if (bp->status_blk->status_tx_quick_consumer_index0 != bp->hw_tx_cons)
if (sblk->status_tx_quick_consumer_index0 != bp->hw_tx_cons)
bnx2_tx_int(bp);

if (bp->status_blk->status_rx_quick_consumer_index0 != bp->hw_rx_cons)
if (sblk->status_rx_quick_consumer_index0 != bp->hw_rx_cons)
work_done += bnx2_rx_int(bp, budget - work_done);

return work_done;
Expand All @@ -2665,23 +2665,27 @@ static int bnx2_poll(struct napi_struct *napi, int budget)
{
struct bnx2 *bp = container_of(napi, struct bnx2, napi);
int work_done = 0;
struct status_block *sblk = bp->status_blk;

while (1) {
work_done = bnx2_poll_work(bp, work_done, budget);

if (unlikely(work_done >= budget))
break;

/* bp->last_status_idx is used below to tell the hw how
* much work has been processed, so we must read it before
* checking for more work.
*/
bp->last_status_idx = sblk->status_idx;
rmb();
if (likely(!bnx2_has_work(bp))) {
bp->last_status_idx = bp->status_blk->status_idx;
rmb();

netif_rx_complete(bp->dev, napi);
if (likely(bp->flags & USING_MSI_FLAG)) {
REG_WR(bp, BNX2_PCICFG_INT_ACK_CMD,
BNX2_PCICFG_INT_ACK_CMD_INDEX_VALID |
bp->last_status_idx);
return 0;
break;
}
REG_WR(bp, BNX2_PCICFG_INT_ACK_CMD,
BNX2_PCICFG_INT_ACK_CMD_INDEX_VALID |
Expand Down

0 comments on commit 5e9d062

Please sign in to comment.