All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-core] Move rtdm_irq_enable close to rtdm_irq_request
@ 2006-09-05 12:58 Jan Kiszka
  2006-09-05 15:38 ` [Xenomai-core] " Wolfgang Grandegger
  0 siblings, 1 reply; 13+ messages in thread
From: Jan Kiszka @ 2006-09-05 12:58 UTC (permalink / raw)
  To: Wolfgang Grandegger; +Cc: xenomai-core


[-- Attachment #1.1: Type: text/plain, Size: 431 bytes --]

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.

Jan

[-- Attachment #1.2: reorder-rtdm_irq_enable.patch --]
[-- Type: text/plain, Size: 1375 bytes --]

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);
+
     mscan_chip_config(regs);
     
 
@@ -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, ret);
 	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:

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2006-09-06 18:13 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-05 12:58 [Xenomai-core] Move rtdm_irq_enable close to rtdm_irq_request Jan Kiszka
2006-09-05 15:38 ` [Xenomai-core] " Wolfgang Grandegger
2006-09-05 16:02   ` Jan Kiszka
2006-09-05 19:10     ` Dmitry Adamushko
2006-09-06  6:36       ` Jan Kiszka
2006-09-06  8:59         ` Dmitry Adamushko
2006-09-06  9:26           ` Jan Kiszka
2006-09-06 12:27             ` Dmitry Adamushko
2006-09-06 14:54               ` Jan Kiszka
2006-09-06 15:08                 ` Dmitry Adamushko
2006-09-06 15:54                   ` Jan Kiszka
2006-09-06 17:23                     ` Dmitry Adamushko
2006-09-06 18:13                       ` Jan Kiszka

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.