Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 45768
b: refs/heads/master
c: d344bff
h: refs/heads/master
v: v3
  • Loading branch information
Dale Farnsworth authored and Jeff Garzik committed Jan 23, 2007
1 parent ce77441 commit e8ffb5b
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: 3196265e97c661d9e9be04d5d64ca8ff3186536d
refs/heads/master: d344bff9c36db17dc4765215495aaa7212c1eb6c
11 changes: 9 additions & 2 deletions trunk/drivers/net/mv643xx_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,13 @@ int mv643xx_eth_free_tx_descs(struct net_device *dev, int force)

while (mp->tx_desc_count > 0) {
spin_lock_irqsave(&mp->lock, flags);

/* tx_desc_count might have changed before acquiring the lock */
if (mp->tx_desc_count <= 0) {
spin_unlock_irqrestore(&mp->lock, flags);
return released;
}

tx_index = mp->tx_used_desc_q;
desc = &mp->p_tx_desc_area[tx_index];
cmd_sts = desc->cmd_sts;
Expand All @@ -332,13 +339,13 @@ int mv643xx_eth_free_tx_descs(struct net_device *dev, int force)
if (skb)
mp->tx_skb[tx_index] = NULL;

spin_unlock_irqrestore(&mp->lock, flags);

if (cmd_sts & ETH_ERROR_SUMMARY) {
printk("%s: Error in TX\n", dev->name);
mp->stats.tx_errors++;
}

spin_unlock_irqrestore(&mp->lock, flags);

if (cmd_sts & ETH_TX_FIRST_DESC)
dma_unmap_single(NULL, addr, count, DMA_TO_DEVICE);
else
Expand Down

0 comments on commit e8ffb5b

Please sign in to comment.