[NET]: Do not call request_irq with spinlock held in sungem.c

parent e2d69a36
...@@ -2101,17 +2101,14 @@ static int gem_open(struct net_device *dev) ...@@ -2101,17 +2101,14 @@ static int gem_open(struct net_device *dev)
gp->hw_running = 1; gp->hw_running = 1;
} }
spin_lock_irq(&gp->lock);
/* We can now request the interrupt as we know it's masked /* We can now request the interrupt as we know it's masked
* on the controller * on the controller
*/ */
if (request_irq(gp->pdev->irq, gem_interrupt, if (request_irq(gp->pdev->irq, gem_interrupt,
SA_SHIRQ, dev->name, (void *)dev)) { SA_SHIRQ, dev->name, (void *)dev)) {
spin_unlock_irq(&gp->lock);
printk(KERN_ERR "%s: failed to request irq !\n", gp->dev->name); printk(KERN_ERR "%s: failed to request irq !\n", gp->dev->name);
spin_lock_irq(&gp->lock);
#ifdef CONFIG_PPC_PMAC #ifdef CONFIG_PPC_PMAC
if (!hw_was_up && gp->pdev->vendor == PCI_VENDOR_ID_APPLE) if (!hw_was_up && gp->pdev->vendor == PCI_VENDOR_ID_APPLE)
gem_apple_powerdown(gp); gem_apple_powerdown(gp);
...@@ -2120,10 +2117,13 @@ static int gem_open(struct net_device *dev) ...@@ -2120,10 +2117,13 @@ static int gem_open(struct net_device *dev)
gp->pm_timer.expires = jiffies + 10*HZ; gp->pm_timer.expires = jiffies + 10*HZ;
add_timer(&gp->pm_timer); add_timer(&gp->pm_timer);
up(&gp->pm_sem); up(&gp->pm_sem);
spin_unlock_irq(&gp->lock);
return -EAGAIN; return -EAGAIN;
} }
spin_lock_irq(&gp->lock);
/* Allocate & setup ring buffers */ /* Allocate & setup ring buffers */
gem_init_rings(gp); gem_init_rings(gp);
......
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