Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 111896
b: refs/heads/master
c: a418950
h: refs/heads/master
v: v3
  • Loading branch information
Lennert Buytenhek authored and Lennert Buytenhek committed Sep 14, 2008
1 parent aaceb1a commit 8e18b2e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 16 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: 8fd89211bf8e8e60415c66e5546c1478f5e8bc2b
refs/heads/master: a418950c1378c4a3722baecdbe98df78ea23f231
22 changes: 7 additions & 15 deletions trunk/drivers/net/mv643xx_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -866,8 +866,6 @@ static int txq_reclaim(struct tx_queue *txq, int budget, int force)
struct tx_desc *desc;
u32 cmd_sts;
struct sk_buff *skb;
dma_addr_t addr;
int count;

tx_index = txq->tx_used_desc;
desc = &txq->tx_desc_area[tx_index];
Expand All @@ -886,8 +884,6 @@ static int txq_reclaim(struct tx_queue *txq, int budget, int force)
reclaimed++;
txq->tx_desc_count--;

addr = desc->buf_ptr;
count = desc->byte_cnt;
skb = txq->tx_skb[tx_index];
txq->tx_skb[tx_index] = NULL;

Expand All @@ -896,20 +892,16 @@ static int txq_reclaim(struct tx_queue *txq, int budget, int force)
mp->dev->stats.tx_errors++;
}

/*
* Drop tx queue lock while we free the skb.
*/
__netif_tx_unlock(nq);

if (cmd_sts & TX_FIRST_DESC)
dma_unmap_single(NULL, addr, count, DMA_TO_DEVICE);
else
dma_unmap_page(NULL, addr, count, DMA_TO_DEVICE);
if (cmd_sts & TX_FIRST_DESC) {
dma_unmap_single(NULL, desc->buf_ptr,
desc->byte_cnt, DMA_TO_DEVICE);
} else {
dma_unmap_page(NULL, desc->buf_ptr,
desc->byte_cnt, DMA_TO_DEVICE);
}

if (skb)
dev_kfree_skb(skb);

__netif_tx_lock(nq, smp_processor_id());
}

__netif_tx_unlock(nq);
Expand Down

0 comments on commit 8e18b2e

Please sign in to comment.