All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai] xeno_mod_isa for a 2 channel can-device with the same shared interrupt for both devices
@ 2012-11-04 13:31 thoga
  2012-11-04 13:42 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 4+ messages in thread
From: thoga @ 2012-11-04 13:31 UTC (permalink / raw)
  To: xenomai, wg

Hi all,

I'm using XENOMAI 2.6.0 on a SYSLOGIC ML/COMPACT6 industrial pc, which has 2 ISA-CAN-bus controllers onbard. 

Both controllers share the same irq=11 while they have different i/o-port regions, the first uses io=0x7600 while the second uses io=0x7700.

When I load the xeno_can_isa module to use only one controller 

    modprobe xeno_can_isa io=0x7600 irq=11

everything works fine and realtime can-communication is possible. But when I want to initialize both can controllers by issuing

    modprobe xeno_can_isa io=0x7600,0x7700 irq=11,11

it says

FATAL: Error inserting xeno_can_isa (/lib/modules/2.6.38.8/kernel/drivers/xenomai/can/sja1000/xeno_can_isa.ko): Device or resource busy

On the other hand the command issued with two different irq (11 and 12)

    modprobe xeno_can_isa io=0x7600,0x7700 irq=11,12

works and the module loads successfully (but the second channel cannot be used due to wrong irq, of course).

Now, my question is: What does the message "Device or resource busy" mean? Does it refere to the irq=11 which is already in use for the first controller and is not available anymore for the second one?

Does anybody have experience in using the xeno_can_isa module with two controllers sharing the same irq ?

Best regards
Thomas









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

* Re: [Xenomai] xeno_mod_isa for a 2 channel can-device with the same shared interrupt for both devices
  2012-11-04 13:31 [Xenomai] xeno_mod_isa for a 2 channel can-device with the same shared interrupt for both devices thoga
@ 2012-11-04 13:42 ` Gilles Chanteperdrix
  2012-11-04 15:01   ` thoga
  0 siblings, 1 reply; 4+ messages in thread
From: Gilles Chanteperdrix @ 2012-11-04 13:42 UTC (permalink / raw)
  To: thoga; +Cc: xenomai

On 11/04/2012 02:31 PM, thoga@yahoo.com wrote:

> Hi all,
> 
> I'm using XENOMAI 2.6.0 on a SYSLOGIC ML/COMPACT6 industrial pc,
> which has 2 ISA-CAN-bus controllers onbard.
> 
> Both controllers share the same irq=11 while they have different
> i/o-port regions, the first uses io=0x7600 while the second uses
> io=0x7700.
> 
> When I load the xeno_can_isa module to use only one controller
> 
> modprobe xeno_can_isa io=0x7600 irq=11
> 
> everything works fine and realtime can-communication is possible. But
> when I want to initialize both can controllers by issuing
> 
> modprobe xeno_can_isa io=0x7600,0x7700 irq=11,11
> 
> it says
> 
> FATAL: Error inserting xeno_can_isa
> (/lib/modules/2.6.38.8/kernel/drivers/xenomai/can/sja1000/xeno_can_isa.ko):
> Device or resource busy
> 
> On the other hand the command issued with two different irq (11 and
> 12)
> 
> modprobe xeno_can_isa io=0x7600,0x7700 irq=11,12
> 
> works and the module loads successfully (but the second channel
> cannot be used due to wrong irq, of course).
> 
> Now, my question is: What does the message "Device or resource busy"
> mean? Does it refere to the irq=11 which is already in use for the
> first controller and is not available anymore for the second one?
> 
> Does anybody have experience in using the xeno_can_isa module with
> two controllers sharing the same irq ?


Do you have CONFIG_XENO_OPT_SHIRQ enabled ?
Does the driver use the XN_ISR_SHARED flag?

-- 
                                                                Gilles.


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

* Re: [Xenomai] xeno_mod_isa for a 2 channel can-device with the same shared interrupt for both devices
  2012-11-04 13:42 ` Gilles Chanteperdrix
@ 2012-11-04 15:01   ` thoga
  2012-11-04 15:09     ` Gilles Chanteperdrix
  0 siblings, 1 reply; 4+ messages in thread
From: thoga @ 2012-11-04 15:01 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai

Hi Gilles,

thanks for your quick answer.

CONFIG_XENO_OPT_SHIRQ was not set in the kernel-config. I'll set the flag and recompile the kernel, but this will take 24h on that slow industrial pc.

XN_ISR_SHARED flag, however, sound more interesting. How can I check, if the driver uses the XN_ISR_SHARED flag?

Thomas



--- On Sun, 11/4/12, Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org> wrote:

> From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
> Subject: Re: [Xenomai] xeno_mod_isa for a 2 channel can-device with the same shared interrupt for both devices
> To: thoga@yahoo.com
> Cc: xenomai@xenomai.org, wg@grandegger.com
> Date: Sunday, November 4, 2012, 2:42 PM
> On 11/04/2012 02:31 PM, thoga@yahoo.com
> wrote:
> 
> > Hi all,
> > 
> > I'm using XENOMAI 2.6.0 on a SYSLOGIC ML/COMPACT6
> industrial pc,
> > which has 2 ISA-CAN-bus controllers onbard.
> > 
> > Both controllers share the same irq=11 while they have
> different
> > i/o-port regions, the first uses io=0x7600 while the
> second uses
> > io=0x7700.
> > 
> > When I load the xeno_can_isa module to use only one
> controller
> > 
> > modprobe xeno_can_isa io=0x7600 irq=11
> > 
> > everything works fine and realtime can-communication is
> possible. But
> > when I want to initialize both can controllers by
> issuing
> > 
> > modprobe xeno_can_isa io=0x7600,0x7700 irq=11,11
> > 
> > it says
> > 
> > FATAL: Error inserting xeno_can_isa
> >
> (/lib/modules/2.6.38.8/kernel/drivers/xenomai/can/sja1000/xeno_can_isa.ko):
> > Device or resource busy
> > 
> > On the other hand the command issued with two different
> irq (11 and
> > 12)
> > 
> > modprobe xeno_can_isa io=0x7600,0x7700 irq=11,12
> > 
> > works and the module loads successfully (but the second
> channel
> > cannot be used due to wrong irq, of course).
> > 
> > Now, my question is: What does the message "Device or
> resource busy"
> > mean? Does it refere to the irq=11 which is already in
> use for the
> > first controller and is not available anymore for the
> second one?
> > 
> > Does anybody have experience in using the xeno_can_isa
> module with
> > two controllers sharing the same irq ?
> 
> 
> Do you have CONFIG_XENO_OPT_SHIRQ enabled ?
> Does the driver use the XN_ISR_SHARED flag?
> 
> -- 
>                
>                
>                
>                
> Gilles.
>


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

* Re: [Xenomai] xeno_mod_isa for a 2 channel can-device with the same shared interrupt for both devices
  2012-11-04 15:01   ` thoga
@ 2012-11-04 15:09     ` Gilles Chanteperdrix
  0 siblings, 0 replies; 4+ messages in thread
From: Gilles Chanteperdrix @ 2012-11-04 15:09 UTC (permalink / raw)
  To: thoga; +Cc: xenomai

On 11/04/2012 04:01 PM, thoga@yahoo.com wrote:

> Hi Gilles,
> 
> thanks for your quick answer.
> 
> CONFIG_XENO_OPT_SHIRQ was not set in the kernel-config. I'll set the
> flag and recompile the kernel, but this will take 24h on that slow
> industrial pc.


There is no reason to compile the kernel on the target.

> 
> XN_ISR_SHARED flag, however, sound more interesting. How can I check,
> if the driver uses the XN_ISR_SHARED flag?


Look at the sources.

-- 
                                                                Gilles.


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

end of thread, other threads:[~2012-11-04 15:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-04 13:31 [Xenomai] xeno_mod_isa for a 2 channel can-device with the same shared interrupt for both devices thoga
2012-11-04 13:42 ` Gilles Chanteperdrix
2012-11-04 15:01   ` thoga
2012-11-04 15:09     ` Gilles Chanteperdrix

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.