Jan Kiszka wrote:
Hi Wolfgang,

in the process of preparing to merge rtdm_irq_enable into
rtdm_irq_request I would like to check if the attached patch is ok, thus
we could finally drop rtdm_irq_enable once the API is refactored. Please
check carefully when the first IRQs may happen and what the handler
expects to be initialised! SJA1000 /should/ be ok as it works with

shared IRQs, but MSCAN does not (why, BTW?) and /may/ stumble.

OK. Why should I use shared interrupts if there is no need? Most embedded PowerPC systems have a dedicated interrupt source.




Index: ksrc/drivers/can/mscan/rtcan_mscan.c
--- ksrc/drivers/can/mscan/rtcan_mscan.c        (revision 1559)
+++ ksrc/drivers/can/mscan/rtcan_mscan.c        (working copy)
@@ -801,7 +801,8 @@ int __init rtcan_mscan_init_one(int idx)
        printk("ERROR! rtdm_irq_request for IRQ %d failed\n", irq);
        goto out_dev_free;
- + rtdm_irq_enable(&dev->irq_handle);
@@ -814,8 +815,6 @@ int __init rtcan_mscan_init_one(int idx) rtcan_mscan_create_proc(dev); - rtdm_irq_enable(&dev->irq_handle); - /* Remember initialized devices */
     rtcan_mscan_devs[idx] = dev;
Index: ksrc/drivers/can/sja1000/rtcan_sja1000.c
--- ksrc/drivers/can/sja1000/rtcan_sja1000.c    (revision 1559)
+++ ksrc/drivers/can/sja1000/rtcan_sja1000.c    (working copy)
@@ -747,6 +747,7 @@ int rtcan_sja1000_register(struct rtcan_
        printk("ERROR! IRQ %d busy or invalid (code=%d)!\n", chip->irq_num, 
        return ret;
+    rtdm_irq_enable(&dev->irq_handle);
sja1000_chip_config(dev); @@ -759,8 +760,6 @@ int rtcan_sja1000_register(struct rtcan_ rtcan_sja_create_proc(dev); - rtdm_irq_enable(&dev->irq_handle); - return 0; out_irq_free:

Xenomai-core mailing list

Reply via email to