Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 200516
b: refs/heads/master
c: 2227bae
h: refs/heads/master
v: v3
  • Loading branch information
Amit Kumar Salecha authored and David S. Miller committed Jun 16, 2010
1 parent 64f660d commit 8f17777
Show file tree
Hide file tree
Showing 2 changed files with 7 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: bf445080dad9542c6bc6b693d941cae89605134c
refs/heads/master: 2227bae22becb88b75ede022c7bb991aabfb50bb
9 changes: 6 additions & 3 deletions trunk/drivers/net/netxen/netxen_nic_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -1805,9 +1805,10 @@ netxen_post_rx_buffers(struct netxen_adapter *adapter, u32 ringid,
netxen_ctx_msg msg = 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 @@ -1829,7 +1830,6 @@ netxen_post_rx_buffers(struct netxen_adapter *adapter, u32 ringid,

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

if (count) {
rds_ring->producer = producer;
Expand All @@ -1853,6 +1853,8 @@ netxen_post_rx_buffers(struct netxen_adapter *adapter, u32 ringid,
NETXEN_RCV_PRODUCER_OFFSET), msg);
}
}

spin_unlock(&rds_ring->lock);
}

static void
Expand All @@ -1864,10 +1866,11 @@ netxen_post_rx_buffers_nodb(struct netxen_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 8f17777

Please sign in to comment.