Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 448
b: refs/heads/master
c: 483ba50
h: refs/heads/master
v: v3
  • Loading branch information
Michael Chan authored and David S. Miller committed Apr 25, 2005
1 parent bbf146e commit 6b698c2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 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: cbdbf00aaf0addd391259f94aaa8e7dc1bfc9081
refs/heads/master: 483ba50bd41d14d5325d6cd9935de86a982d08a2
14 changes: 6 additions & 8 deletions trunk/drivers/net/tg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -2686,8 +2686,8 @@ static int tg3_vlan_rx(struct tg3 *tp, struct sk_buff *skb, u16 vlan_tag)
static int tg3_rx(struct tg3 *tp, int budget)
{
u32 work_mask;
u32 rx_rcb_ptr = tp->rx_rcb_ptr;
u16 hw_idx, sw_idx;
u32 sw_idx = tp->rx_rcb_ptr;
u16 hw_idx;
int received;

hw_idx = tp->hw_status->idx[0].rx_producer;
Expand All @@ -2696,7 +2696,6 @@ static int tg3_rx(struct tg3 *tp, int budget)
* the opaque cookie.
*/
rmb();
sw_idx = rx_rcb_ptr % TG3_RX_RCB_RING_SIZE(tp);
work_mask = 0;
received = 0;
while (sw_idx != hw_idx && budget > 0) {
Expand Down Expand Up @@ -2801,14 +2800,13 @@ static int tg3_rx(struct tg3 *tp, int budget)
next_pkt:
(*post_ptr)++;
next_pkt_nopost:
rx_rcb_ptr++;
sw_idx = rx_rcb_ptr % TG3_RX_RCB_RING_SIZE(tp);
sw_idx++;
sw_idx %= TG3_RX_RCB_RING_SIZE(tp);
}

/* ACK the status ring. */
tp->rx_rcb_ptr = rx_rcb_ptr;
tw32_rx_mbox(MAILBOX_RCVRET_CON_IDX_0 + TG3_64BIT_REG_LOW,
(rx_rcb_ptr % TG3_RX_RCB_RING_SIZE(tp)));
tp->rx_rcb_ptr = sw_idx;
tw32_rx_mbox(MAILBOX_RCVRET_CON_IDX_0 + TG3_64BIT_REG_LOW, sw_idx);

/* Refill RX ring(s). */
if (work_mask & RXD_OPAQUE_RING_STD) {
Expand Down

0 comments on commit 6b698c2

Please sign in to comment.