Module: xenomai-gch
Branch: for-forge
Commit: bcf0020151c5dccc59cd505deedb45214d924edd
URL:    
http://git.xenomai.org/?p=xenomai-gch.git;a=commit;h=bcf0020151c5dccc59cd505deedb45214d924edd

Author: Gilles Chanteperdrix <gilles.chanteperd...@xenomai.org>
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;
        raw_spin_lock_init(&intr->lock);
 #ifdef CONFIG_XENO_OPT_SHIRQ


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git

Reply via email to