* [Xenomai-help] "Inappropriate ioctl for device" with xeno_16550A on Xenomai 2.6, not Xenomai 2.5
@ 2012-01-18 21:09 Manuel Vonthron
2012-01-18 21:35 ` Gilles Chanteperdrix
0 siblings, 1 reply; 7+ messages in thread
From: Manuel Vonthron @ 2012-01-18 21:09 UTC (permalink / raw)
To: xenomai
[-- Attachment #1: Type: text/plain, Size: 1363 bytes --]
Dear all,
I am using the driver "xeno_16550A" for serial communication between a
powersupply and its controlling PC (x86). I started working with Xenomai
2.5.5, but I recently switched to another machine where I installed Xenomai
2.6.
On this new machine, I get the "Inappropriate ioctl for device" error while
setting up my serial connection:
err = rt_dev_ioctl(fd, RTSER_RTIOC_SET_CONFIG, &serial_config);
>> error -25: Inappropriate ioctl for device
The following reads/writes don't fail but without proper configuration,
messages aren't understood by the device.
My tests with non-RT code and the regular Linux driver keeps working with
this new machine and again, the RT code is the very same, I only updated my
Makefile to match the new version.
- setserial infos:
/dev/ttyS0 uart 16550A port 0x03f8 irq 4 baud_base 115200 spd_normal
skip_test
- xeno_16550A loaded with:
`modprobe -v xeno_16550A io=0x03f8 irq=4 baud_base=115200`
- result of "rtdm" unit test:
SetupExclusive openSuccessive openDefer close by driver handlerDefer
close by pending referenceNormal closeDeferred module unload#
Do you have any idea where the error comes from and how would I fix it?
Thanks,
Manuel
--
Manuel Vonthron
Laboratoire de Nanorobotique
École Polytechnique de Montréal
Montréal, QC
http://nano.polymtl.ca/
[-- Attachment #2: Type: text/html, Size: 1561 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Xenomai-help] "Inappropriate ioctl for device" with xeno_16550A on Xenomai 2.6, not Xenomai 2.5
2012-01-18 21:09 [Xenomai-help] "Inappropriate ioctl for device" with xeno_16550A on Xenomai 2.6, not Xenomai 2.5 Manuel Vonthron
@ 2012-01-18 21:35 ` Gilles Chanteperdrix
2012-01-18 21:56 ` Manuel Vonthron
0 siblings, 1 reply; 7+ messages in thread
From: Gilles Chanteperdrix @ 2012-01-18 21:35 UTC (permalink / raw)
To: Manuel Vonthron; +Cc: xenomai
On 01/18/2012 10:09 PM, Manuel Vonthron wrote:
> Dear all,
>
> I am using the driver "xeno_16550A" for serial communication between a
> powersupply and its controlling PC (x86). I started working with Xenomai
> 2.5.5, but I recently switched to another machine where I installed Xenomai
> 2.6.
>
> On this new machine, I get the "Inappropriate ioctl for device" error while
> setting up my serial connection:
> err = rt_dev_ioctl(fd, RTSER_RTIOC_SET_CONFIG, &serial_config);
> >> error -25: Inappropriate ioctl for device
> The following reads/writes don't fail but without proper configuration,
> messages aren't understood by the device.
>
> My tests with non-RT code and the regular Linux driver keeps working with
> this new machine and again, the RT code is the very same, I only updated my
> Makefile to match the new version.
>
> - setserial infos:
> /dev/ttyS0 uart 16550A port 0x03f8 irq 4 baud_base 115200 spd_normal
> skip_test
> - xeno_16550A loaded with:
> `modprobe -v xeno_16550A io=0x03f8 irq=4 baud_base=115200`
> - result of "rtdm" unit test:
> SetupExclusive openSuccessive openDefer close by driver handlerDefer
> close by pending referenceNormal closeDeferred module unload#
>
> Do you have any idea where the error comes from and how would I fix it?
It could be due to the version of gc. Try passing
CFLAGS="-fno-omit-frame-pointer"
on configure commande line.
--
Gilles.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Xenomai-help] "Inappropriate ioctl for device" with xeno_16550A on Xenomai 2.6, not Xenomai 2.5
2012-01-18 21:35 ` Gilles Chanteperdrix
@ 2012-01-18 21:56 ` Manuel Vonthron
2012-01-19 20:39 ` Gilles Chanteperdrix
0 siblings, 1 reply; 7+ messages in thread
From: Manuel Vonthron @ 2012-01-18 21:56 UTC (permalink / raw)
To: Gilles Chanteperdrix; +Cc: xenomai
[-- Attachment #1: Type: text/plain, Size: 2005 bytes --]
"-fno-omit-frame-pointer" doesn't fix the problem but gcc versions are
indeed different:
- gcc 4.3.2 on the "working" machine
- gcc 4.6.2 on the other
Thanks for your help
On Wed, Jan 18, 2012 at 4:35 PM, Gilles Chanteperdrix <
gilles.chanteperdrix@xenomai.org> wrote:
> On 01/18/2012 10:09 PM, Manuel Vonthron wrote:
> > Dear all,
> >
> > I am using the driver "xeno_16550A" for serial communication between a
> > powersupply and its controlling PC (x86). I started working with Xenomai
> > 2.5.5, but I recently switched to another machine where I installed
> Xenomai
> > 2.6.
> >
> > On this new machine, I get the "Inappropriate ioctl for device" error
> while
> > setting up my serial connection:
> > err = rt_dev_ioctl(fd, RTSER_RTIOC_SET_CONFIG, &serial_config);
> > >> error -25: Inappropriate ioctl for device
> > The following reads/writes don't fail but without proper configuration,
> > messages aren't understood by the device.
> >
> > My tests with non-RT code and the regular Linux driver keeps working with
> > this new machine and again, the RT code is the very same, I only updated
> my
> > Makefile to match the new version.
> >
> > - setserial infos:
> > /dev/ttyS0 uart 16550A port 0x03f8 irq 4 baud_base 115200 spd_normal
> > skip_test
> > - xeno_16550A loaded with:
> > `modprobe -v xeno_16550A io=0x03f8 irq=4 baud_base=115200`
> > - result of "rtdm" unit test:
> > SetupExclusive openSuccessive openDefer close by driver handlerDefer
> > close by pending referenceNormal closeDeferred module unload#
> >
> > Do you have any idea where the error comes from and how would I fix it?
>
> It could be due to the version of gc. Try passing
> CFLAGS="-fno-omit-frame-pointer"
> on configure commande line.
>
> --
> Gilles.
>
--
Manuel Vonthron
Laboratoire de Nanorobotique
École Polytechnique de Montréal
Montréal, QC
http://nano.polymtl.ca/
[-- Attachment #2: Type: text/html, Size: 2656 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Xenomai-help] "Inappropriate ioctl for device" with xeno_16550A on Xenomai 2.6, not Xenomai 2.5
2012-01-18 21:56 ` Manuel Vonthron
@ 2012-01-19 20:39 ` Gilles Chanteperdrix
2012-01-23 19:53 ` Manuel Vonthron
0 siblings, 1 reply; 7+ messages in thread
From: Gilles Chanteperdrix @ 2012-01-19 20:39 UTC (permalink / raw)
To: Manuel Vonthron; +Cc: xenomai
On 01/18/2012 10:56 PM, Manuel Vonthron wrote:
> "-fno-omit-frame-pointer" doesn't fix the problem but gcc versions are
> indeed different:
> - gcc 4.3.2 on the "working" machine
> - gcc 4.6.2 on the other
gcc 4.6.2 definitely needs -fno-omit-frame-pointer. Stupid suggestion:
if you re-used the same build directory for xenomai user-space, did you
think about running "make clean" after reconfiguring?
--
Gilles.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Xenomai-help] "Inappropriate ioctl for device" with xeno_16550A on Xenomai 2.6, not Xenomai 2.5
2012-01-19 20:39 ` Gilles Chanteperdrix
@ 2012-01-23 19:53 ` Manuel Vonthron
2012-01-23 20:00 ` Gilles Chanteperdrix
0 siblings, 1 reply; 7+ messages in thread
From: Manuel Vonthron @ 2012-01-23 19:53 UTC (permalink / raw)
To: Gilles Chanteperdrix; +Cc: xenomai
[-- Attachment #1: Type: text/plain, Size: 842 bytes --]
On Thu, Jan 19, 2012 at 3:39 PM, Gilles Chanteperdrix <
gilles.chanteperdrix@xenomai.org> wrote:
> gcc 4.6.2 definitely needs -fno-omit-frame-pointer. Stupid suggestion:
> if you re-used the same build directory for xenomai user-space, did you
> think about running "make clean" after reconfiguring?
>
I wasn't using the same build directory. And as far as my own program is
concerned, I "make clean" before each compilation.
However I just saw one difference on the kernel configuration,
RT/drivers/Serial
- on the working (2.5) machine, access mode is set to "any"
- on the other one (2.6), access mode is set to "port-based" only
Can this setting be the cause of my problem ?
Thanks
--
Manuel Vonthron
Laboratoire de Nanorobotique
École Polytechnique de Montréal
Montréal, QC
http://nano.polymtl.ca/
[-- Attachment #2: Type: text/html, Size: 1271 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Xenomai-help] "Inappropriate ioctl for device" with xeno_16550A on Xenomai 2.6, not Xenomai 2.5
2012-01-23 19:53 ` Manuel Vonthron
@ 2012-01-23 20:00 ` Gilles Chanteperdrix
2012-01-23 20:19 ` Manuel Vonthron
0 siblings, 1 reply; 7+ messages in thread
From: Gilles Chanteperdrix @ 2012-01-23 20:00 UTC (permalink / raw)
To: Manuel Vonthron; +Cc: xenomai
On 01/23/2012 08:53 PM, Manuel Vonthron wrote:
> On Thu, Jan 19, 2012 at 3:39 PM, Gilles Chanteperdrix <
> gilles.chanteperdrix@xenomai.org> wrote:
>
>> gcc 4.6.2 definitely needs -fno-omit-frame-pointer. Stupid suggestion:
>> if you re-used the same build directory for xenomai user-space, did you
>> think about running "make clean" after reconfiguring?
>>
>
> I wasn't using the same build directory. And as far as my own program is
> concerned, I "make clean" before each compilation.
> However I just saw one difference on the kernel configuration,
> RT/drivers/Serial
> - on the working (2.5) machine, access mode is set to "any"
> - on the other one (2.6), access mode is set to "port-based" only
>
> Can this setting be the cause of my problem ?
I guess you would get some error message if the driver was not working,
did you check the kernel logs?
>
> Thanks
>
>
>
--
Gilles.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Xenomai-help] "Inappropriate ioctl for device" with xeno_16550A on Xenomai 2.6, not Xenomai 2.5
2012-01-23 20:00 ` Gilles Chanteperdrix
@ 2012-01-23 20:19 ` Manuel Vonthron
0 siblings, 0 replies; 7+ messages in thread
From: Manuel Vonthron @ 2012-01-23 20:19 UTC (permalink / raw)
To: Gilles Chanteperdrix; +Cc: xenomai
[-- Attachment #1: Type: text/plain, Size: 919 bytes --]
> I guess you would get some error message if the driver was not working,
> did you check the kernel logs?
>
There isn't even a warning. Here is what I get when running my app (from
syslog):
Jan 23 15:14:38 mrsub kernel: [445923.280301] Xenomai: RTDM: closing file
descriptor 0.
Jan 23 15:14:38 mrsub kernel: [445923.301782] Xenomai: native: cleaning
up heap "" (ret=0).
Jan 23 15:14:38 mrsub kernel: [445923.323247] Xenomai: native: cleaning
up mutex "ctrl-mutex" (ret=0).
(on a separate note, in this log, the RT heap name isn't found while it
actually exists in /proc/xenomai/heap)
I have no message when "modprobing" the driver.
> >
> > Thanks
> >
> >
> >
>
>
> --
> Gilles.
>
--
Manuel Vonthron
Laboratoire de Nanorobotique
École Polytechnique de Montréal
Montréal, QC
http://nano.polymtl.ca/
[-- Attachment #2: Type: text/html, Size: 1461 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-01-23 20:19 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-18 21:09 [Xenomai-help] "Inappropriate ioctl for device" with xeno_16550A on Xenomai 2.6, not Xenomai 2.5 Manuel Vonthron
2012-01-18 21:35 ` Gilles Chanteperdrix
2012-01-18 21:56 ` Manuel Vonthron
2012-01-19 20:39 ` Gilles Chanteperdrix
2012-01-23 19:53 ` Manuel Vonthron
2012-01-23 20:00 ` Gilles Chanteperdrix
2012-01-23 20:19 ` Manuel Vonthron
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.