From 81d1d9a6160294ab0459a70305714b9c679dc855 Mon Sep 17 00:00:00 2001 From: Dongdong Deng Date: Sun, 12 Jul 2009 20:27:06 +0000 Subject: [PATCH] --- yaml --- r: 155461 b: refs/heads/master c: 79fbe134832ebb70a49d8802cfeb2401dc35bb38 h: refs/heads/master i: 155459: 9d54f833f8d5505a7dd2125984719784da5dcfdb v: v3 --- [refs] | 2 +- trunk/drivers/net/cs89x0.c | 7 ++++--- trunk/drivers/net/isa-skeleton.c | 5 +++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 9d5362823f70..ebd329c15141 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: bc23283c7bc90958927abe26eedc562701743a88 +refs/heads/master: 79fbe134832ebb70a49d8802cfeb2401dc35bb38 diff --git a/trunk/drivers/net/cs89x0.c b/trunk/drivers/net/cs89x0.c index 3eee666a9cd2..55445f980f9c 100644 --- a/trunk/drivers/net/cs89x0.c +++ b/trunk/drivers/net/cs89x0.c @@ -1524,6 +1524,7 @@ static void net_timeout(struct net_device *dev) static int net_send_packet(struct sk_buff *skb, struct net_device *dev) { struct net_local *lp = netdev_priv(dev); + unsigned long flags; if (net_debug > 3) { printk("%s: sent %d byte packet of type %x\n", @@ -1535,7 +1536,7 @@ static int net_send_packet(struct sk_buff *skb, struct net_device *dev) ask the chip to start transmitting before the whole packet has been completely uploaded. */ - spin_lock_irq(&lp->lock); + spin_lock_irqsave(&lp->lock, flags); netif_stop_queue(dev); /* initiate a transmit sequence */ @@ -1549,13 +1550,13 @@ static int net_send_packet(struct sk_buff *skb, struct net_device *dev) * we're waiting for TxOk, so return 1 and requeue this packet. */ - spin_unlock_irq(&lp->lock); + spin_unlock_irqrestore(&lp->lock, flags); if (net_debug) printk("cs89x0: Tx buffer not free!\n"); return NETDEV_TX_BUSY; } /* Write the contents of the packet */ writewords(dev->base_addr, TX_FRAME_PORT,skb->data,(skb->len+1) >>1); - spin_unlock_irq(&lp->lock); + spin_unlock_irqrestore(&lp->lock, flags); lp->stats.tx_bytes += skb->len; dev->trans_start = jiffies; dev_kfree_skb (skb); diff --git a/trunk/drivers/net/isa-skeleton.c b/trunk/drivers/net/isa-skeleton.c index 73585fd8f29f..d12377b84358 100644 --- a/trunk/drivers/net/isa-skeleton.c +++ b/trunk/drivers/net/isa-skeleton.c @@ -430,7 +430,8 @@ static int net_send_packet(struct sk_buff *skb, struct net_device *dev) * hardware interrupt handler. Queue flow control is * thus managed under this lock as well. */ - spin_lock_irq(&np->lock); + unsigned long flags; + spin_lock_irqsave(&np->lock, flags); add_to_tx_ring(np, skb, length); dev->trans_start = jiffies; @@ -446,7 +447,7 @@ static int net_send_packet(struct sk_buff *skb, struct net_device *dev) * is when the transmit statistics are updated. */ - spin_unlock_irq(&np->lock); + spin_unlock_irqrestore(&np->lock, flags); #else /* This is the case for older hardware which takes * a single transmit buffer at a time, and it is