Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 194329
b: refs/heads/master
c: ed6f135
h: refs/heads/master
i:
  194327: cbcda8f
v: v3
  • Loading branch information
Amit Kumar Salecha authored and David S. Miller committed Apr 22, 2010
1 parent 8b7860a commit 87b4654
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 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: ade91f8ec92da43b62b0efaa854cfd4b5ec0c0c9
refs/heads/master: ed6f1353e195b4432e251667b2d84d766d07c79c
8 changes: 5 additions & 3 deletions trunk/drivers/net/qlcnic/qlcnic_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -1554,9 +1554,10 @@ qlcnic_post_rx_buffers(struct qlcnic_adapter *adapter, u32 ringid,
int producer, count = 0;
struct list_head *head;

spin_lock(&rds_ring->lock);

producer = rds_ring->producer;

spin_lock(&rds_ring->lock);
head = &rds_ring->free_list;
while (!list_empty(head)) {

Expand All @@ -1578,13 +1579,13 @@ qlcnic_post_rx_buffers(struct qlcnic_adapter *adapter, u32 ringid,

producer = get_next_index(producer, rds_ring->num_desc);
}
spin_unlock(&rds_ring->lock);

if (count) {
rds_ring->producer = producer;
writel((producer-1) & (rds_ring->num_desc-1),
rds_ring->crb_rcv_producer);
}
spin_unlock(&rds_ring->lock);
}

static void
Expand All @@ -1596,10 +1597,11 @@ qlcnic_post_rx_buffers_nodb(struct qlcnic_adapter *adapter,
int producer, count = 0;
struct list_head *head;

producer = rds_ring->producer;
if (!spin_trylock(&rds_ring->lock))
return;

producer = rds_ring->producer;

head = &rds_ring->free_list;
while (!list_empty(head)) {

Expand Down

0 comments on commit 87b4654

Please sign in to comment.