Commit f4c57464 authored by Jeff Garzik's avatar Jeff Garzik

[netdrvr tg3] s/spin_lock/spin_lock_irqsave/ in tg3_poll and tg3_timer

The tg3_timer one is very likely superfluous, and will hopefully be
removed after extended testing.
parent 791a0502
...@@ -2017,9 +2017,10 @@ static int tg3_poll(struct net_device *netdev, int *budget) ...@@ -2017,9 +2017,10 @@ static int tg3_poll(struct net_device *netdev, int *budget)
{ {
struct tg3 *tp = netdev->priv; struct tg3 *tp = netdev->priv;
struct tg3_hw_status *sblk = tp->hw_status; struct tg3_hw_status *sblk = tp->hw_status;
unsigned long flags;
int done; int done;
spin_lock_irq(&tp->lock); spin_lock_irqsave(&tp->lock, flags);
if (!(tp->tg3_flags & if (!(tp->tg3_flags &
(TG3_FLAG_USE_LINKCHG_REG | (TG3_FLAG_USE_LINKCHG_REG |
...@@ -2059,7 +2060,7 @@ static int tg3_poll(struct net_device *netdev, int *budget) ...@@ -2059,7 +2060,7 @@ static int tg3_poll(struct net_device *netdev, int *budget)
tg3_unmask_ints(tp); tg3_unmask_ints(tp);
} }
spin_unlock_irq(&tp->lock); spin_unlock_irqrestore(&tp->lock, flags);
return (done ? 0 : 1); return (done ? 0 : 1);
} }
...@@ -4353,8 +4354,9 @@ static int tg3_init_hw(struct tg3 *tp) ...@@ -4353,8 +4354,9 @@ static int tg3_init_hw(struct tg3 *tp)
static void tg3_timer(unsigned long __opaque) static void tg3_timer(unsigned long __opaque)
{ {
struct tg3 *tp = (struct tg3 *) __opaque; struct tg3 *tp = (struct tg3 *) __opaque;
unsigned long flags;
spin_lock_irq(&tp->lock); spin_lock_irqsave(&tp->lock, flags);
spin_lock(&tp->tx_lock); spin_lock(&tp->tx_lock);
/* All of this garbage is because when using non-tagged /* All of this garbage is because when using non-tagged
...@@ -4436,7 +4438,7 @@ static void tg3_timer(unsigned long __opaque) ...@@ -4436,7 +4438,7 @@ static void tg3_timer(unsigned long __opaque)
} }
spin_unlock(&tp->tx_lock); spin_unlock(&tp->tx_lock);
spin_unlock_irq(&tp->lock); spin_unlock_irqrestore(&tp->lock, flags);
tp->timer.expires = jiffies + tp->timer_offset; tp->timer.expires = jiffies + tp->timer_offset;
add_timer(&tp->timer); add_timer(&tp->timer);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment