From: Jan Kiszka <jan.kiszka@domain.hid>
To: Wolfgang Grandegger <wg@domain.hid>
Cc: xenomai-core <xenomai@xenomai.org>
Subject: [Xenomai-core] Move rtdm_irq_enable close to rtdm_irq_request
Date: Tue, 05 Sep 2006 14:58:11 +0200 [thread overview]
Message-ID: <44FD7463.7010601@domain.hid> (raw)
[-- 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 --]
next reply other threads:[~2006-09-05 12:58 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-05 12:58 Jan Kiszka [this message]
2006-09-05 15:38 ` [Xenomai-core] Re: Move rtdm_irq_enable close to rtdm_irq_request 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=44FD7463.7010601@domain.hid \
--to=jan.kiszka@domain.hid \
--cc=wg@domain.hid \
--cc=xenomai@xenomai.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.