]> git.hungrycats.org Git - linux/commitdiff
[TIGON3]: Use spin_lock_irqsave in tg3_interrupt, fixes SMP hang.
authorDavid S. Miller <davem@nuts.ninka.net>
Thu, 12 Sep 2002 13:37:06 +0000 (06:37 -0700)
committerDavid S. Miller <davem@nuts.ninka.net>
Thu, 12 Sep 2002 13:37:06 +0000 (06:37 -0700)
drivers/net/tg3.c

index 6d31e0ad95cf0eee2cd7e3747f0526b934f5bcc7..79d2d540041829950b5b12c1b2ec32be8d04b0ed 100644 (file)
@@ -2109,8 +2109,9 @@ static void tg3_interrupt(int irq, void *dev_id, struct pt_regs *regs)
        struct net_device *dev = dev_id;
        struct tg3 *tp = dev->priv;
        struct tg3_hw_status *sblk = tp->hw_status;
+       unsigned long flags;
 
-       spin_lock(&tp->lock);
+       spin_lock_irqsave(&tp->lock, flags);
 
        if (sblk->status & SD_STATUS_UPDATED) {
                tw32_mailbox(MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW,
@@ -2124,7 +2125,7 @@ static void tg3_interrupt(int irq, void *dev_id, struct pt_regs *regs)
                tr32(MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW);
        }
 
-       spin_unlock(&tp->lock);
+       spin_unlock_irqrestore(&tp->lock, flags);
 }
 
 static void tg3_init_rings(struct tg3 *);