diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-02-12 20:47:15 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-02-12 20:47:15 -0500 |
commit | 37bed90094fdb1eea6e4afec6a200d4e60143e55 (patch) | |
tree | 4590075dbc03c13dd532a974f040f18a07b1d130 /drivers/net/sunhme.c | |
parent | 071a0bc2ceace31266836801510879407a3701fa (diff) | |
parent | 1d7b33f77b2d8b0b1ee767e6f8f05cbd9d72cb7c (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (32 commits)
wimax: fix oops in wimax_dev_get_by_genl_info() when looking up non-wimax iface
net: 4 bytes kernel memory disclosure in SO_BSDCOMPAT gsopt try #2
netxen: fix compile waring "label ‘set_32_bit_mask’ defined but not used" on IA64 platform
bnx2: Update version to 1.9.2 and copyright.
bnx2: Fix jumbo frames error handling.
bnx2: Update 5709 firmware.
bnx2: Update 5706/5708 firmware.
3c505: do not set pcb->data.raw beyond its size
Documentation/connector/cn_test.c: don't use gfp_any()
net: don't use in_atomic() in gfp_any()
IRDA: cnt is off by 1
netxen: remove pcie workaround
sun3: print when lance_open() fails
qlge: bugfix: Add missing rx buf clean index on early exit.
qlge: bugfix: Fix RX scaling values.
qlge: bugfix: Fix TSO breakage.
qlge: bugfix: Add missing dev_kfree_skb_any() call.
qlge: bugfix: Add missing put_page() call.
qlge: bugfix: Fix fatal error recovery hang.
qlge: bugfix: Use netif_receive_skb() and vlan_hwaccel_receive_skb().
...
Diffstat (limited to 'drivers/net/sunhme.c')
-rw-r--r-- | drivers/net/sunhme.c | 34 |
1 files changed, 28 insertions, 6 deletions
diff --git a/drivers/net/sunhme.c b/drivers/net/sunhme.c index cc4013be5e18..d4fb4acdbebd 100644 --- a/drivers/net/sunhme.c +++ b/drivers/net/sunhme.c | |||
@@ -2543,25 +2543,36 @@ static struct quattro * __devinit quattro_sbus_find(struct of_device *child) | |||
2543 | } | 2543 | } |
2544 | 2544 | ||
2545 | /* After all quattro cards have been probed, we call these functions | 2545 | /* After all quattro cards have been probed, we call these functions |
2546 | * to register the IRQ handlers. | 2546 | * to register the IRQ handlers for the cards that have been |
2547 | * successfully probed and skip the cards that failed to initialize | ||
2547 | */ | 2548 | */ |
2548 | static void __init quattro_sbus_register_irqs(void) | 2549 | static int __init quattro_sbus_register_irqs(void) |
2549 | { | 2550 | { |
2550 | struct quattro *qp; | 2551 | struct quattro *qp; |
2551 | 2552 | ||
2552 | for (qp = qfe_sbus_list; qp != NULL; qp = qp->next) { | 2553 | for (qp = qfe_sbus_list; qp != NULL; qp = qp->next) { |
2553 | struct of_device *op = qp->quattro_dev; | 2554 | struct of_device *op = qp->quattro_dev; |
2554 | int err; | 2555 | int err, qfe_slot, skip = 0; |
2556 | |||
2557 | for (qfe_slot = 0; qfe_slot < 4; qfe_slot++) { | ||
2558 | if (!qp->happy_meals[qfe_slot]) | ||
2559 | skip = 1; | ||
2560 | } | ||
2561 | if (skip) | ||
2562 | continue; | ||
2555 | 2563 | ||
2556 | err = request_irq(op->irqs[0], | 2564 | err = request_irq(op->irqs[0], |
2557 | quattro_sbus_interrupt, | 2565 | quattro_sbus_interrupt, |
2558 | IRQF_SHARED, "Quattro", | 2566 | IRQF_SHARED, "Quattro", |
2559 | qp); | 2567 | qp); |
2560 | if (err != 0) { | 2568 | if (err != 0) { |
2561 | printk(KERN_ERR "Quattro: Fatal IRQ registery error %d.\n", err); | 2569 | printk(KERN_ERR "Quattro HME: IRQ registration " |
2562 | panic("QFE request irq"); | 2570 | "error %d.\n", err); |
2571 | return err; | ||
2563 | } | 2572 | } |
2564 | } | 2573 | } |
2574 | |||
2575 | return 0; | ||
2565 | } | 2576 | } |
2566 | 2577 | ||
2567 | static void quattro_sbus_free_irqs(void) | 2578 | static void quattro_sbus_free_irqs(void) |
@@ -2570,6 +2581,14 @@ static void quattro_sbus_free_irqs(void) | |||
2570 | 2581 | ||
2571 | for (qp = qfe_sbus_list; qp != NULL; qp = qp->next) { | 2582 | for (qp = qfe_sbus_list; qp != NULL; qp = qp->next) { |
2572 | struct of_device *op = qp->quattro_dev; | 2583 | struct of_device *op = qp->quattro_dev; |
2584 | int qfe_slot, skip = 0; | ||
2585 | |||
2586 | for (qfe_slot = 0; qfe_slot < 4; qfe_slot++) { | ||
2587 | if (!qp->happy_meals[qfe_slot]) | ||
2588 | skip = 1; | ||
2589 | } | ||
2590 | if (skip) | ||
2591 | continue; | ||
2573 | 2592 | ||
2574 | free_irq(op->irqs[0], qp); | 2593 | free_irq(op->irqs[0], qp); |
2575 | } | 2594 | } |
@@ -2828,6 +2847,9 @@ err_out_iounmap: | |||
2828 | if (hp->tcvregs) | 2847 | if (hp->tcvregs) |
2829 | of_iounmap(&op->resource[4], hp->tcvregs, TCVR_REG_SIZE); | 2848 | of_iounmap(&op->resource[4], hp->tcvregs, TCVR_REG_SIZE); |
2830 | 2849 | ||
2850 | if (qp) | ||
2851 | qp->happy_meals[qfe_slot] = NULL; | ||
2852 | |||
2831 | err_out_free_netdev: | 2853 | err_out_free_netdev: |
2832 | free_netdev(dev); | 2854 | free_netdev(dev); |
2833 | 2855 | ||
@@ -3285,7 +3307,7 @@ static int __init happy_meal_sbus_init(void) | |||
3285 | 3307 | ||
3286 | err = of_register_driver(&hme_sbus_driver, &of_bus_type); | 3308 | err = of_register_driver(&hme_sbus_driver, &of_bus_type); |
3287 | if (!err) | 3309 | if (!err) |
3288 | quattro_sbus_register_irqs(); | 3310 | err = quattro_sbus_register_irqs(); |
3289 | 3311 | ||
3290 | return err; | 3312 | return err; |
3291 | } | 3313 | } |