diff options
author | Francois Romieu <romieu@fr.zoreil.com> | 2005-11-06 19:52:57 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-11-07 03:37:05 -0500 |
commit | 6c2f4267833f453156f8f439cc32eb4c92f357b4 (patch) | |
tree | 912f0075a855d652a58a9bb8cd9f3ca9a98fd745 /drivers/net/b44.c | |
parent | 65b984f26f16e97168ee29e53145055412f38a23 (diff) |
[PATCH] b44: late request_irq in b44_open
Don't request_irq before the registers are reset/init.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/net/b44.c')
-rw-r--r-- | drivers/net/b44.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/drivers/net/b44.c b/drivers/net/b44.c index 09e1b4deae59..ecc2e32c38c1 100644 --- a/drivers/net/b44.c +++ b/drivers/net/b44.c | |||
@@ -1388,13 +1388,7 @@ static int b44_open(struct net_device *dev) | |||
1388 | 1388 | ||
1389 | err = b44_alloc_consistent(bp); | 1389 | err = b44_alloc_consistent(bp); |
1390 | if (err) | 1390 | if (err) |
1391 | return err; | 1391 | goto out; |
1392 | |||
1393 | err = request_irq(dev->irq, b44_interrupt, SA_SHIRQ, dev->name, dev); | ||
1394 | if (err) | ||
1395 | goto err_out_free; | ||
1396 | |||
1397 | spin_lock_irq(&bp->lock); | ||
1398 | 1392 | ||
1399 | b44_init_rings(bp); | 1393 | b44_init_rings(bp); |
1400 | b44_init_hw(bp); | 1394 | b44_init_hw(bp); |
@@ -1403,7 +1397,13 @@ static int b44_open(struct net_device *dev) | |||
1403 | netif_carrier_off(dev); | 1397 | netif_carrier_off(dev); |
1404 | b44_check_phy(bp); | 1398 | b44_check_phy(bp); |
1405 | 1399 | ||
1406 | spin_unlock_irq(&bp->lock); | 1400 | err = request_irq(dev->irq, b44_interrupt, SA_SHIRQ, dev->name, dev); |
1401 | if (unlikely(err < 0)) { | ||
1402 | b44_chip_reset(bp); | ||
1403 | b44_free_rings(bp); | ||
1404 | b44_free_consistent(bp); | ||
1405 | goto out; | ||
1406 | } | ||
1407 | 1407 | ||
1408 | init_timer(&bp->timer); | 1408 | init_timer(&bp->timer); |
1409 | bp->timer.expires = jiffies + HZ; | 1409 | bp->timer.expires = jiffies + HZ; |
@@ -1412,11 +1412,7 @@ static int b44_open(struct net_device *dev) | |||
1412 | add_timer(&bp->timer); | 1412 | add_timer(&bp->timer); |
1413 | 1413 | ||
1414 | b44_enable_ints(bp); | 1414 | b44_enable_ints(bp); |
1415 | 1415 | out: | |
1416 | return 0; | ||
1417 | |||
1418 | err_out_free: | ||
1419 | b44_free_consistent(bp); | ||
1420 | return err; | 1416 | return err; |
1421 | } | 1417 | } |
1422 | 1418 | ||