From: Dale Farnsworth <[EMAIL PROTECTED]>

We can't call request_irq() while holding a spin lock.

Signed-off-by: Dale Farnsworth <[EMAIL PROTECTED]>

Index: linux-2.6-mv643xx_enet/drivers/net/mv643xx_eth.c
===================================================================
--- linux-2.6-mv643xx_enet.orig/drivers/net/mv643xx_eth.c
+++ linux-2.6-mv643xx_enet/drivers/net/mv643xx_eth.c
@@ -655,34 +655,24 @@ static int mv643xx_eth_open(struct net_d
        unsigned int port_num = mp->port_num;
        int err;
 
-       spin_lock_irq(&mp->lock);
-
        err = request_irq(dev->irq, mv643xx_eth_int_handler,
                        SA_SHIRQ | SA_SAMPLE_RANDOM, dev->name, dev);
-
        if (err) {
                printk(KERN_ERR "Can not assign IRQ number to MV643XX_eth%d\n",
                                                                port_num);
-               err = -EAGAIN;
-               goto out;
+               return -EAGAIN;
        }
 
+       spin_lock_irq(&mp->lock);
+
        if (mv643xx_eth_real_open(dev)) {
                printk("%s: Error opening interface\n", dev->name);
+               free_irq(dev->irq, dev);
                err = -EBUSY;
-               goto out_free;
        }
 
        spin_unlock_irq(&mp->lock);
 
-       return 0;
-
-out_free:
-       free_irq(dev->irq, dev);
-
-out:
-       spin_unlock_irq(&mp->lock);
-
        return err;
 }
 
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to