Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 109121
b: refs/heads/master
c: 2772f90
h: refs/heads/master
i:
  109119: 40c0a29
v: v3
  • Loading branch information
Eilon Greenstein authored and David S. Miller committed Aug 25, 2008
1 parent f1699a7 commit 79f4b0e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 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: ce3113ec57abcd41cc5a2fed02474aee3f63d12c
refs/heads/master: 2772f9037355a031725987661621290380e58f52
2 changes: 1 addition & 1 deletion trunk/drivers/net/bnx2x.h
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ struct bnx2x_fastpath {
(fp->tx_pkt_prod != fp->tx_pkt_cons))

#define BNX2X_HAS_RX_WORK(fp) \
(fp->rx_comp_cons != le16_to_cpu(*fp->rx_cons_sb))
(fp->rx_comp_cons != rx_cons_sb)

#define BNX2X_HAS_WORK(fp) (BNX2X_HAS_RX_WORK(fp) || BNX2X_HAS_TX_WORK(fp))

Expand Down
7 changes: 7 additions & 0 deletions trunk/drivers/net/bnx2x_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -9250,6 +9250,7 @@ static int bnx2x_poll(struct napi_struct *napi, int budget)
napi);
struct bnx2x *bp = fp->bp;
int work_done = 0;
u16 rx_cons_sb;

#ifdef BNX2X_STOP_ON_ERROR
if (unlikely(bp->panic))
Expand All @@ -9265,10 +9266,16 @@ static int bnx2x_poll(struct napi_struct *napi, int budget)
if (BNX2X_HAS_TX_WORK(fp))
bnx2x_tx_int(fp, budget);

rx_cons_sb = le16_to_cpu(*fp->rx_cons_sb);
if ((rx_cons_sb & MAX_RCQ_DESC_CNT) == MAX_RCQ_DESC_CNT)
rx_cons_sb++;
if (BNX2X_HAS_RX_WORK(fp))
work_done = bnx2x_rx_int(fp, budget);

rmb(); /* BNX2X_HAS_WORK() reads the status block */
rx_cons_sb = le16_to_cpu(*fp->rx_cons_sb);
if ((rx_cons_sb & MAX_RCQ_DESC_CNT) == MAX_RCQ_DESC_CNT)
rx_cons_sb++;

/* must not complete if we consumed full budget */
if ((work_done < budget) && !BNX2X_HAS_WORK(fp)) {
Expand Down

0 comments on commit 79f4b0e

Please sign in to comment.