|
@@ -2543,25 +2543,36 @@ static struct quattro * __devinit quattro_sbus_find(struct of_device *child)
|
|
}
|
|
}
|
|
|
|
|
|
/* After all quattro cards have been probed, we call these functions
|
|
/* 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;
|
|
struct quattro *qp;
|
|
|
|
|
|
for (qp = qfe_sbus_list; qp != NULL; qp = qp->next) {
|
|
for (qp = qfe_sbus_list; qp != NULL; qp = qp->next) {
|
|
struct of_device *op = qp->quattro_dev;
|
|
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],
|
|
err = request_irq(op->irqs[0],
|
|
quattro_sbus_interrupt,
|
|
quattro_sbus_interrupt,
|
|
IRQF_SHARED, "Quattro",
|
|
IRQF_SHARED, "Quattro",
|
|
qp);
|
|
qp);
|
|
if (err != 0) {
|
|
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)
|
|
static void quattro_sbus_free_irqs(void)
|
|
@@ -2570,6 +2581,14 @@ static void quattro_sbus_free_irqs(void)
|
|
|
|
|
|
for (qp = qfe_sbus_list; qp != NULL; qp = qp->next) {
|
|
for (qp = qfe_sbus_list; qp != NULL; qp = qp->next) {
|
|
struct of_device *op = qp->quattro_dev;
|
|
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);
|
|
free_irq(op->irqs[0], qp);
|
|
}
|
|
}
|
|
@@ -2828,6 +2847,9 @@ err_out_iounmap:
|
|
if (hp->tcvregs)
|
|
if (hp->tcvregs)
|
|
of_iounmap(&op->resource[4], hp->tcvregs, TCVR_REG_SIZE);
|
|
of_iounmap(&op->resource[4], hp->tcvregs, TCVR_REG_SIZE);
|
|
|
|
|
|
|
|
+ if (qp)
|
|
|
|
+ qp->happy_meals[qfe_slot] = NULL;
|
|
|
|
+
|
|
err_out_free_netdev:
|
|
err_out_free_netdev:
|
|
free_netdev(dev);
|
|
free_netdev(dev);
|
|
|
|
|
|
@@ -3285,7 +3307,7 @@ static int __init happy_meal_sbus_init(void)
|
|
|
|
|
|
err = of_register_driver(&hme_sbus_driver, &of_bus_type);
|
|
err = of_register_driver(&hme_sbus_driver, &of_bus_type);
|
|
if (!err)
|
|
if (!err)
|
|
- quattro_sbus_register_irqs();
|
|
|
|
|
|
+ err = quattro_sbus_register_irqs();
|
|
|
|
|
|
return err;
|
|
return err;
|
|
}
|
|
}
|