From mboxrd@z Thu Jan 1 00:00:00 1970 References: From: Jan Kiszka Message-ID: <565D4C05.7000907@siemens.com> Date: Tue, 1 Dec 2015 08:28:05 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Subject: Re: [Xenomai] Disabling shared IRQ line List-Id: Discussions about the Xenomai project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?0JDQu9C10LrRgdC10Lkg0JPQtdGA0LDRgdGR0LI=?= , xenomai@xenomai.org On 2015-12-01 06:35, Алексей Герасёв wrote: > Hello everyone! > > I have x86_64 PC with CAN adapter served by PLX PCI driver on board. I've > installed Xenomai 3.0.1 Cobalt on Linux kernel 3.16.7 with > ipipe-core-3.16.7-x86-5 patch. My CAN adapter has two channels, and they're > registered on one IRQ line (in my case it's 19). Shared interrupts were > enabled. When one channel is up and other is down, I have strange error: > when I sent 500 and received 500 frames through one channel interface, the > IRQ line became disabled with message: '[Xenomai] xnintr_vec_handler: IRQ19 > not handled. Disabling IRQ line'. When both channels are up, there is no > such error. > > I've found in 'xnintr_vec_handler' in 'xenomai-3/kernel/cobalt/intr.c' file > of xenomai source that if at least one handler on shared IRQ line returns > 'XN_IRQ_NONE', then 'vec->unhandled' counter is incremented, and when it > reaches 1000, the corresponding IRQ line is disabled. In my case the > handler of the first channel, which is up, returns 'XN_IRQ_HANDLED' but the > second one, which is down, returns 'XN_IRQ_NONE'. > > The question is: is this behavior in 'xnintr_vec_handler' correct? Do I > always need to enable both channels although I use only one of them? No, this is a regression of aefaab5d03. I'll push a patch to fix this to my upstream queue. Thanks for reporting! Jan -- Siemens AG, Corporate Technology, CT RTC ITP SES-DE Corporate Competence Center Embedded Linux