提交 6c2f4267 编写于 作者: F Francois Romieu 提交者: Jeff Garzik

[PATCH] b44: late request_irq in b44_open

Don't request_irq before the registers are reset/init.
Signed-off-by: NFrancois Romieu <romieu@fr.zoreil.com>
Signed-off-by: NJeff Garzik <jgarzik@pobox.com>
上级 65b984f2
...@@ -1388,13 +1388,7 @@ static int b44_open(struct net_device *dev) ...@@ -1388,13 +1388,7 @@ static int b44_open(struct net_device *dev)
err = b44_alloc_consistent(bp); err = b44_alloc_consistent(bp);
if (err) if (err)
return err; goto out;
err = request_irq(dev->irq, b44_interrupt, SA_SHIRQ, dev->name, dev);
if (err)
goto err_out_free;
spin_lock_irq(&bp->lock);
b44_init_rings(bp); b44_init_rings(bp);
b44_init_hw(bp); b44_init_hw(bp);
...@@ -1403,7 +1397,13 @@ static int b44_open(struct net_device *dev) ...@@ -1403,7 +1397,13 @@ static int b44_open(struct net_device *dev)
netif_carrier_off(dev); netif_carrier_off(dev);
b44_check_phy(bp); b44_check_phy(bp);
spin_unlock_irq(&bp->lock); err = request_irq(dev->irq, b44_interrupt, SA_SHIRQ, dev->name, dev);
if (unlikely(err < 0)) {
b44_chip_reset(bp);
b44_free_rings(bp);
b44_free_consistent(bp);
goto out;
}
init_timer(&bp->timer); init_timer(&bp->timer);
bp->timer.expires = jiffies + HZ; bp->timer.expires = jiffies + HZ;
...@@ -1412,11 +1412,7 @@ static int b44_open(struct net_device *dev) ...@@ -1412,11 +1412,7 @@ static int b44_open(struct net_device *dev)
add_timer(&bp->timer); add_timer(&bp->timer);
b44_enable_ints(bp); b44_enable_ints(bp);
out:
return 0;
err_out_free:
b44_free_consistent(bp);
return err; return err;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册