Module: xenomai-3
Branch: master
Commit: 587447a2c4e709723f6a0dea6bf4736e94b1d040
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=587447a2c4e709723f6a0dea6bf4736e94b1d040

Author: Philippe Gerum <r...@xenomai.org>
Date:   Thu May  7 10:37:52 2015 +0200

drivers/udd: no generic mask/unmask for custom IRQs

---

 include/rtdm/uapi/udd.h  |    8 ++++++++
 kernel/drivers/udd/udd.c |    2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/include/rtdm/uapi/udd.h b/include/rtdm/uapi/udd.h
index 50672ee..065df12 100644
--- a/include/rtdm/uapi/udd.h
+++ b/include/rtdm/uapi/udd.h
@@ -75,12 +75,20 @@ struct udd_signotify {
  * this request when received through its ->ioctl() handler if
  * provided. Otherwise, the UDD core disables the interrupt line in
  * the interrupt controller before returning to the caller.
+ *
+ * @note The mini-driver must handle the UDD_RTIOC_IRQEN request for a
+ * custom IRQ from its ->ioctl() handler, otherwise such request
+ * receives -EIO from the UDD core.
  */
 #define UDD_RTIOC_IRQDIS       _IO(RTDM_CLASS_UDD, 1)
 /**
  * Enable/Disable signal notification upon interrupt event. A valid
  * @ref udd_signotify "notification descriptor" must be passed along
  * with this request, which is handled by the UDD core directly.
+ *
+ * @note The mini-driver must handle the UDD_RTIOC_IRQDIS request for
+ * a custom IRQ from its ->ioctl() handler, otherwise such request
+ * receives -EIO from the UDD core.
  */
 #define UDD_RTIOC_IRQSIG       _IOW(RTDM_CLASS_UDD, 2, struct udd_signotify)
 
diff --git a/kernel/drivers/udd/udd.c b/kernel/drivers/udd/udd.c
index 9858328..c5116d3 100644
--- a/kernel/drivers/udd/udd.c
+++ b/kernel/drivers/udd/udd.c
@@ -93,7 +93,7 @@ static int udd_ioctl_rt(struct rtdm_fd *fd,
                break;
        case UDD_RTIOC_IRQEN:
        case UDD_RTIOC_IRQDIS:
-               if (udd->irq == UDD_IRQ_NONE)
+               if (udd->irq == UDD_IRQ_NONE || udd->irq == UDD_IRQ_CUSTOM)
                        return -EIO;
                rtdm_event_init(&done, 0);
                if (request == UDD_RTIOC_IRQEN)


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

Reply via email to