@@ -182,7 +182,7 @@ int irq_startup(struct irq_desc *desc, bool resend)
ret = desc->irq_data.chip->irq_startup(&desc->irq_data);
irq_state_clr_masked(desc);
} else {
- irq_enable(desc);
+ irq_enable(desc, false);
}
if (resend)
check_irq_resend(desc, desc->irq_data.irq);
@@ -202,13 +202,14 @@ void irq_shutdown(struct irq_desc *desc)
irq_state_set_masked(desc);
}
-void irq_enable(struct irq_desc *desc)
+void irq_enable(struct irq_desc *desc, bool ifmasked)
{
irq_state_clr_disabled(desc);
- if (desc->irq_data.chip->irq_enable)
+ if (desc->irq_data.chip->irq_enable) {
desc->irq_data.chip->irq_enable(&desc->irq_data);
- else
+ } else if (!ifmasked || irqd_irq_masked(&desc->irq_data)) {
desc->irq_data.chip->irq_unmask(&desc->irq_data);
+ }
irq_state_clr_masked(desc);
}
@@ -68,7 +68,7 @@ extern void __enable_irq(struct irq_desc *desc, unsigned int irq);
extern int irq_startup(struct irq_desc *desc, bool resend);
extern void irq_shutdown(struct irq_desc *desc);
-extern void irq_enable(struct irq_desc *desc);
+extern void irq_enable(struct irq_desc *desc, bool ifmasked);
extern void irq_disable(struct irq_desc *desc);
extern void irq_percpu_enable(struct irq_desc *desc, unsigned int cpu);
extern void irq_percpu_disable(struct irq_desc *desc, unsigned int cpu);
@@ -448,7 +448,7 @@ void __enable_irq(struct irq_desc *desc, unsigned int irq)
goto err_out;
/* Prevent probing on this irq: */
irq_settings_set_noprobe(desc);
- irq_enable(desc);
+ irq_enable(desc, true);
check_irq_resend(desc, irq);
/* fall-through */
}