Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 194777
b: refs/heads/master
c: 4d30b80
h: refs/heads/master
i:
  194775: 1026620
v: v3
  • Loading branch information
David Daney authored and David S. Miller committed May 6, 2010
1 parent 48d98d3 commit c221248
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 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: 62538d2490d071e822d85651445c8a0bb4ed5a4b
refs/heads/master: 4d30b8013b2d82138d6900965fe9fcd062f2d06d
11 changes: 9 additions & 2 deletions trunk/drivers/net/octeon/octeon_mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,19 @@ static void octeon_mgmt_clean_tx_buffers(struct octeon_mgmt *p)

mix_orcnt.u64 = cvmx_read_csr(CVMX_MIXX_ORCNT(port));
while (mix_orcnt.s.orcnt) {
spin_lock_irqsave(&p->tx_list.lock, flags);

mix_orcnt.u64 = cvmx_read_csr(CVMX_MIXX_ORCNT(port));

if (mix_orcnt.s.orcnt == 0) {
spin_unlock_irqrestore(&p->tx_list.lock, flags);
break;
}

dma_sync_single_for_cpu(p->dev, p->tx_ring_handle,
ring_size_to_bytes(OCTEON_MGMT_TX_RING_SIZE),
DMA_BIDIRECTIONAL);

spin_lock_irqsave(&p->tx_list.lock, flags);

re.d64 = p->tx_ring[p->tx_next_clean];
p->tx_next_clean =
(p->tx_next_clean + 1) % OCTEON_MGMT_TX_RING_SIZE;
Expand Down

0 comments on commit c221248

Please sign in to comment.