Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 214302
b: refs/heads/master
c: a613f58
h: refs/heads/master
v: v3
  • Loading branch information
Santiago Leon authored and David S. Miller committed Sep 7, 2010
1 parent 84081d8 commit 5e6dc8f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 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: a5d31e0faf025ca8f64b85fc6938b702105725b7
refs/heads/master: a613f581489aff23189c4945aec9567f6663b0c6
11 changes: 7 additions & 4 deletions trunk/drivers/net/ibmveth.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,9 @@ static void ibmveth_replenish_buffer_pool(struct ibmveth_adapter *adapter, struc
}

free_index = pool->consumer_index;
pool->consumer_index = (pool->consumer_index + 1) % pool->size;
pool->consumer_index++;
if (pool->consumer_index >= pool->size)
pool->consumer_index = 0;
index = pool->free_map[free_index];

ibmveth_assert(index != IBM_VETH_INVALID_MAP);
Expand Down Expand Up @@ -377,9 +379,10 @@ static void ibmveth_remove_buffer_from_pool(struct ibmveth_adapter *adapter, u64
DMA_FROM_DEVICE);

free_index = adapter->rx_buff_pool[pool].producer_index;
adapter->rx_buff_pool[pool].producer_index
= (adapter->rx_buff_pool[pool].producer_index + 1)
% adapter->rx_buff_pool[pool].size;
adapter->rx_buff_pool[pool].producer_index++;
if (adapter->rx_buff_pool[pool].producer_index >=
adapter->rx_buff_pool[pool].size)
adapter->rx_buff_pool[pool].producer_index = 0;
adapter->rx_buff_pool[pool].free_map[free_index] = index;

mb();
Expand Down

0 comments on commit 5e6dc8f

Please sign in to comment.