Module: xenomai-3
Branch: next
Commit: a8d0efffc57464b03e93e0d0f4308a34faed21c2

Author: Gilles Chanteperdrix <>
Date:   Sat Nov 15 22:55:21 2014 +0100

cobalt/intr: fix first enable

In order to enable an irq after having requested it, upper layers
use xnintr_enable() after xnintr_attach().

But xnintr_enable() does not call ipipe_enable_irq if the XN_IRQSTAT_DISABLED
is not set in the intr object status field.

So, in particular, xnintr_enable() called after xnintr_attach() is a nop,
which results in RT driver irqs lines not being enabled, and the driver not
receiving irqs.

Fix this by setting the XN_IRQSTAT_DISABLED bit in the intr object status
field in xnintr_init().


 kernel/cobalt/intr.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/cobalt/intr.c b/kernel/cobalt/intr.c
index 3f9bcae..fb29dab 100644
--- a/kernel/cobalt/intr.c
+++ b/kernel/cobalt/intr.c
@@ -745,7 +745,7 @@ int xnintr_init(struct xnintr *intr, const char *name,
        intr->cookie = NULL;
        intr->name = name ? : "<unknown>";
        intr->flags = flags;
-       intr->status = 0;
+       intr->status = _XN_IRQSTAT_DISABLED;
        intr->unhandled = 0;

Xenomai-git mailing list

Reply via email to