]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 12 Mar 2009 16:27:53 +0000 (09:27 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 12 Mar 2009 16:27:53 +0000 (09:27 -0700)
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  sunhme: Fix qfe parent detection.
  sparc64: Fix lost interrupts on sun4u.
  sparc64: wait_event_interruptible_timeout may return -ERESTARTSYS
  jsflash: stop defining MAJOR_NR

1  2 
drivers/net/sunhme.c

diff --combined drivers/net/sunhme.c
index d4fb4acdbebdfc9ca70d28a3abb9e0b88753dfd0,0ff837a9c8047078097b4540f7f48634b266c1ca..4e9bd380a5c2ea2b50661627e439da2a9bc2712e
@@@ -2543,36 -2543,25 +2543,36 @@@ static struct quattro * __devinit quatt
  }
  
  /* After all quattro cards have been probed, we call these functions
 - * to register the IRQ handlers.
 + * to register the IRQ handlers for the cards that have been
 + * successfully probed and skip the cards that failed to initialize
   */
 -static void __init quattro_sbus_register_irqs(void)
 +static int __init quattro_sbus_register_irqs(void)
  {
        struct quattro *qp;
  
        for (qp = qfe_sbus_list; qp != NULL; qp = qp->next) {
                struct of_device *op = qp->quattro_dev;
 -              int err;
 +              int err, qfe_slot, skip = 0;
 +
 +              for (qfe_slot = 0; qfe_slot < 4; qfe_slot++) {
 +                      if (!qp->happy_meals[qfe_slot])
 +                              skip = 1;
 +              }
 +              if (skip)
 +                      continue;
  
                err = request_irq(op->irqs[0],
                                  quattro_sbus_interrupt,
                                  IRQF_SHARED, "Quattro",
                                  qp);
                if (err != 0) {
 -                      printk(KERN_ERR "Quattro: Fatal IRQ registery error %d.\n", err);
 -                      panic("QFE request irq");
 +                      printk(KERN_ERR "Quattro HME: IRQ registration "
 +                             "error %d.\n", err);
 +                      return err;
                }
        }
 +
 +      return 0;
  }
  
  static void quattro_sbus_free_irqs(void)
  
        for (qp = qfe_sbus_list; qp != NULL; qp = qp->next) {
                struct of_device *op = qp->quattro_dev;
 +              int qfe_slot, skip = 0;
 +
 +              for (qfe_slot = 0; qfe_slot < 4; qfe_slot++) {
 +                      if (!qp->happy_meals[qfe_slot])
 +                              skip = 1;
 +              }
 +              if (skip)
 +                      continue;
  
                free_irq(op->irqs[0], qp);
        }
@@@ -2649,8 -2630,6 +2649,6 @@@ static int __devinit happy_meal_sbus_pr
        int err = -ENODEV;
  
        sbus_dp = to_of_device(op->dev.parent)->node;
-       if (is_qfe)
-               sbus_dp = to_of_device(op->dev.parent->parent)->node;
  
        /* We can match PCI devices too, do not accept those here. */
        if (strcmp(sbus_dp->name, "sbus"))
@@@ -2847,9 -2826,6 +2845,9 @@@ err_out_iounmap
        if (hp->tcvregs)
                of_iounmap(&op->resource[4], hp->tcvregs, TCVR_REG_SIZE);
  
 +      if (qp)
 +              qp->happy_meals[qfe_slot] = NULL;
 +
  err_out_free_netdev:
        free_netdev(dev);
  
@@@ -3307,7 -3283,7 +3305,7 @@@ static int __init happy_meal_sbus_init(
  
        err = of_register_driver(&hme_sbus_driver, &of_bus_type);
        if (!err)
 -              quattro_sbus_register_irqs();
 +              err = quattro_sbus_register_irqs();
  
        return err;
  }