Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 156909
b: refs/heads/master
c: 22580f8
h: refs/heads/master
i:
  156907: f8ab948
v: v3
  • Loading branch information
Dongdong Deng authored and David S. Miller committed Aug 14, 2009
1 parent 87087f0 commit b2c47ff
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 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: 0527a1a8440a20b3d0fd1d0c9e75a6f38a9d5315
refs/heads/master: 22580f894ac190c46beebb5c3172e450a2318f79
5 changes: 3 additions & 2 deletions trunk/drivers/net/b44.c
Original file line number Diff line number Diff line change
Expand Up @@ -952,9 +952,10 @@ static int b44_start_xmit(struct sk_buff *skb, struct net_device *dev)
int rc = NETDEV_TX_OK;
dma_addr_t mapping;
u32 len, entry, ctrl;
unsigned long flags;

len = skb->len;
spin_lock_irq(&bp->lock);
spin_lock_irqsave(&bp->lock, flags);

/* This is a hard error, log it. */
if (unlikely(TX_BUFFS_AVAIL(bp) < 1)) {
Expand Down Expand Up @@ -1027,7 +1028,7 @@ static int b44_start_xmit(struct sk_buff *skb, struct net_device *dev)
dev->trans_start = jiffies;

out_unlock:
spin_unlock_irq(&bp->lock);
spin_unlock_irqrestore(&bp->lock, flags);

return rc;

Expand Down
5 changes: 3 additions & 2 deletions trunk/drivers/net/tulip/tulip_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -652,8 +652,9 @@ tulip_start_xmit(struct sk_buff *skb, struct net_device *dev)
int entry;
u32 flag;
dma_addr_t mapping;
unsigned long flags;

spin_lock_irq(&tp->lock);
spin_lock_irqsave(&tp->lock, flags);

/* Calculate the next Tx descriptor entry. */
entry = tp->cur_tx % TX_RING_SIZE;
Expand Down Expand Up @@ -688,7 +689,7 @@ tulip_start_xmit(struct sk_buff *skb, struct net_device *dev)
/* Trigger an immediate transmit demand. */
iowrite32(0, tp->base_addr + CSR1);

spin_unlock_irq(&tp->lock);
spin_unlock_irqrestore(&tp->lock, flags);

dev->trans_start = jiffies;

Expand Down
5 changes: 3 additions & 2 deletions trunk/drivers/net/ucc_geth.c
Original file line number Diff line number Diff line change
Expand Up @@ -3111,10 +3111,11 @@ static int ucc_geth_start_xmit(struct sk_buff *skb, struct net_device *dev)
u8 __iomem *bd; /* BD pointer */
u32 bd_status;
u8 txQ = 0;
unsigned long flags;

ugeth_vdbg("%s: IN", __func__);

spin_lock_irq(&ugeth->lock);
spin_lock_irqsave(&ugeth->lock, flags);

dev->stats.tx_bytes += skb->len;

Expand Down Expand Up @@ -3171,7 +3172,7 @@ static int ucc_geth_start_xmit(struct sk_buff *skb, struct net_device *dev)
uccf = ugeth->uccf;
out_be16(uccf->p_utodr, UCC_FAST_TOD);
#endif
spin_unlock_irq(&ugeth->lock);
spin_unlock_irqrestore(&ugeth->lock, flags);

return 0;
}
Expand Down
5 changes: 3 additions & 2 deletions trunk/drivers/net/via-rhine.c
Original file line number Diff line number Diff line change
Expand Up @@ -1218,6 +1218,7 @@ static int rhine_start_tx(struct sk_buff *skb, struct net_device *dev)
struct rhine_private *rp = netdev_priv(dev);
void __iomem *ioaddr = rp->base;
unsigned entry;
unsigned long flags;

/* Caution: the write order is important here, set the field
with the "ownership" bits last. */
Expand Down Expand Up @@ -1261,7 +1262,7 @@ static int rhine_start_tx(struct sk_buff *skb, struct net_device *dev)
cpu_to_le32(TXDESC | (skb->len >= ETH_ZLEN ? skb->len : ETH_ZLEN));

/* lock eth irq */
spin_lock_irq(&rp->lock);
spin_lock_irqsave(&rp->lock, flags);
wmb();
rp->tx_ring[entry].tx_status = cpu_to_le32(DescOwn);
wmb();
Expand All @@ -1280,7 +1281,7 @@ static int rhine_start_tx(struct sk_buff *skb, struct net_device *dev)

dev->trans_start = jiffies;

spin_unlock_irq(&rp->lock);
spin_unlock_irqrestore(&rp->lock, flags);

if (debug > 4) {
printk(KERN_DEBUG "%s: Transmit frame #%d queued in slot %d.\n",
Expand Down

0 comments on commit b2c47ff

Please sign in to comment.