Skip to content

Commit

Permalink
[TG3]: Refresh hw index in tg3_rx()
Browse files Browse the repository at this point in the history
This patch refreshes the hw rx producer in tg3_rx() so that additional
work posted by the hardware can be processed.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Michael Chan authored and David S. Miller committed Apr 25, 2005
1 parent 483ba50 commit 52f6d69
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/net/tg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -2802,6 +2802,12 @@ static int tg3_rx(struct tg3 *tp, int budget)
next_pkt_nopost:
sw_idx++;
sw_idx %= TG3_RX_RCB_RING_SIZE(tp);

/* Refresh hw_idx to see if there is new work */
if (sw_idx == hw_idx) {
hw_idx = tp->hw_status->idx[0].rx_producer;
rmb();
}
}

/* ACK the status ring. */
Expand Down

0 comments on commit 52f6d69

Please sign in to comment.