* [Xenomai-core] [PULL REQUEST] analogy: bug fixes
@ 2010-01-15 0:51 Alexis Berlemont
0 siblings, 0 replies; 13+ messages in thread
From: Alexis Berlemont @ 2010-01-15 0:51 UTC (permalink / raw)
To: xenomai-core
The following changes since commit 963fc21168ca6b29ab7c7ea95d56a393c475bdce:
Gilles Chanteperdrix (1):
bootstrap
are available in the git repository at:
git://git.xenomai.org/xenomai-abe.git analogy
Alexis Berlemont (4):
analogy: [NI mite] initialize channels' status
analogy: [NI mite] add debug traces
analogy: [NI mite] initialize the mite structures after their
allocations
analogy: fix a bug in the initialization of the user root descriptor
ksrc/drivers/analogy/national_instruments/mite.c | 70
++++++++++++++--------
src/drvlib/analogy/descriptor.c | 12 +++-
2 files changed, 56 insertions(+), 26 deletions(-)
Alexis.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Xenomai-core] [PULL REQUEST] analogy: bug fixes
@ 2010-03-20 0:28 Alexis Berlemont
2010-03-20 12:56 ` Daniele Nicolodi
0 siblings, 1 reply; 13+ messages in thread
From: Alexis Berlemont @ 2010-03-20 0:28 UTC (permalink / raw)
To: xenomai-core
The following changes since commit 8cfc1103fe1cf9e700698e8230baf562ffb5cf06:
Gilles Chanteperdrix (1):
x86 syscalls: make __xn_get_eip a macro
are available in the git repository at:
git://git.xenomai.org/xenomai-abe.git analogy
Alexis Berlemont (16):
analogy: in insn_read, no more real-time mode and automatic subd
selection
analogy: in insn_write, no more real-time mode and automatic subd
selection
analogy: improve robustness of the detach procedure
analogy: minor changes in comments
analogy: fix a potential missing initialization of the subd
descriptor
analogy: make a4l_config_subd support open drain configuration
analogy: [pcimio] fix many race conditions in DMA output transfers
analogy: make __pre_abs_get more robust at ends of acquisitions
analogy: fix a bug in cmd_read with real-time mode enabled
analogy: remove rt_task_set_mode from test programs
analogy: change the error code in case of context error (-EPERM
-> -ENOSYS)
analogy: [loop] add the asynchronous callbacks for the write
subdevice
analogy: in cmd_{read, write}, replace a4l_sys_* by a4l_async_*
analogy: declare a4l_async_read and a4l_async_write in analogy.h
analogy: add a description of TRIG_WAKE_EOS
analogy: at close time, cancel any busy subdevice
Daniele Nicolodi (2):
analogy: [pcimio] enable subdevice buffer mmapping
analogy: fix a bug in a4l_ioctl_bufinfo when idle
Stefan Schaal (1):
analogy: add a4l_config_subd() declaration in analogy.h
include/analogy/analogy.h | 9 +
include/analogy/buffer.h | 28 ++++-
include/analogy/command.h | 2 +-
include/analogy/transfer.h | 3 +
ksrc/drivers/analogy/buffer.c | 17 ++-
ksrc/drivers/analogy/device.c | 37 +++--
.../analogy/national_instruments/mio_common.c | 102 ++++++++------
ksrc/drivers/analogy/national_instruments/mite.c | 17 ++-
ksrc/drivers/analogy/rtdm_interface.c | 5 +-
ksrc/drivers/analogy/testing/loop.c | 23 ++-
ksrc/drivers/analogy/transfer.c | 69 ++++++++--
src/drvlib/analogy/sync.c | 3 +-
src/utils/analogy/cmd_read.c | 33 +----
src/utils/analogy/cmd_write.c | 13 +--
src/utils/analogy/insn_bits.c | 20 +++
src/utils/analogy/insn_read.c | 145
++++++++----------
src/utils/analogy/insn_write.c | 154
+++++++++-----------
17 files changed, 374 insertions(+), 306 deletions(-)
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Xenomai-core] [PULL REQUEST] analogy: bug fixes
2010-03-20 0:28 [Xenomai-core] [PULL REQUEST] analogy: " Alexis Berlemont
@ 2010-03-20 12:56 ` Daniele Nicolodi
2010-03-21 20:59 ` Alexis Berlemont
0 siblings, 1 reply; 13+ messages in thread
From: Daniele Nicolodi @ 2010-03-20 12:56 UTC (permalink / raw)
To: Alexis Berlemont; +Cc: xenomai-core
Alexis Berlemont wrote:
> The following changes since commit 8cfc1103fe1cf9e700698e8230baf562ffb5cf06:
> Gilles Chanteperdrix (1):
> x86 syscalls: make __xn_get_eip a macro
>
> are available in the git repository at:
>
> git://git.xenomai.org/xenomai-abe.git analogy
Hello. Looking at your pull request, I see that my patch for correct
buffer handling when using .stop_src = TRIG_NONE is not included. Does
the patch need some more work? Or it simply get lost on the way?
Thanks. Cheers,
--
Daniele
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Xenomai-core] [PULL REQUEST] analogy: bug fixes
2010-03-20 12:56 ` Daniele Nicolodi
@ 2010-03-21 20:59 ` Alexis Berlemont
2010-03-24 10:48 ` Daniele Nicolodi
0 siblings, 1 reply; 13+ messages in thread
From: Alexis Berlemont @ 2010-03-21 20:59 UTC (permalink / raw)
To: Daniele Nicolodi; +Cc: xenomai-core
Daniele Nicolodi wrote:
> Alexis Berlemont wrote:
> > The following changes since commit 8cfc1103fe1cf9e700698e8230baf562ffb5cf06:
> > Gilles Chanteperdrix (1):
> > x86 syscalls: make __xn_get_eip a macro
> >
> > are available in the git repository at:
> >
> > git://git.xenomai.org/xenomai-abe.git analogy
>
> Hello. Looking at your pull request, I see that my patch for correct
> buffer handling when using .stop_src = TRIG_NONE is not included. Does
> the patch need some more work? Or it simply get lost on the way?
I have not forgotten it. I did not include it for two reasons:
- I have not found time to (fully) test it
- I wanted to properly modify the test program cmd_read so as to allow
continuous acquisisitions
>
> Thanks. Cheers,
> --
> Daniele
>
--
Alexis.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Xenomai-core] [PULL REQUEST] analogy: bug fixes
2010-03-21 20:59 ` Alexis Berlemont
@ 2010-03-24 10:48 ` Daniele Nicolodi
2010-03-24 23:44 ` Alexis Berlemont
0 siblings, 1 reply; 13+ messages in thread
From: Daniele Nicolodi @ 2010-03-24 10:48 UTC (permalink / raw)
To: Alexis Berlemont; +Cc: xenomai-core
Alexis Berlemont wrote:
> Daniele Nicolodi wrote:
>> Alexis Berlemont wrote:
>>> The following changes since commit 8cfc1103fe1cf9e700698e8230baf562ffb5cf06:
>>> Gilles Chanteperdrix (1):
>>> x86 syscalls: make __xn_get_eip a macro
>>>
>>> are available in the git repository at:
>>>
>>> git://git.xenomai.org/xenomai-abe.git analogy
>> Hello. Looking at your pull request, I see that my patch for correct
>> buffer handling when using .stop_src = TRIG_NONE is not included. Does
>> the patch need some more work? Or it simply get lost on the way?
> I have not forgotten it. I did not include it for two reasons:
> - I have not found time to (fully) test it
> - I wanted to properly modify the test program cmd_read so as to allow
> continuous acquisisitions
Hi Alexis. Sorry for the late response. That's fine, I just wanted to be
sure that the patch was not dropped by mistake. I'll test continuous
output today and let you know if any other bugfix is necessary. I can
also look into providing a patch for cmd_read and cmd_write.
Cheers,
--
Daniele
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Xenomai-core] [PULL REQUEST] analogy: bug fixes
2010-03-24 10:48 ` Daniele Nicolodi
@ 2010-03-24 23:44 ` Alexis Berlemont
2010-03-25 0:05 ` Daniele Nicolodi
0 siblings, 1 reply; 13+ messages in thread
From: Alexis Berlemont @ 2010-03-24 23:44 UTC (permalink / raw)
To: Daniele Nicolodi; +Cc: xenomai-core
Hi,
Daniele Nicolodi wrote:
> Alexis Berlemont wrote:
> > Daniele Nicolodi wrote:
> >> Alexis Berlemont wrote:
> >>> The following changes since commit 8cfc1103fe1cf9e700698e8230baf562ffb5cf06:
> >>> Gilles Chanteperdrix (1):
> >>> x86 syscalls: make __xn_get_eip a macro
> >>>
> >>> are available in the git repository at:
> >>>
> >>> git://git.xenomai.org/xenomai-abe.git analogy
> >> Hello. Looking at your pull request, I see that my patch for correct
> >> buffer handling when using .stop_src = TRIG_NONE is not included. Does
> >> the patch need some more work? Or it simply get lost on the way?
> > I have not forgotten it. I did not include it for two reasons:
> > - I have not found time to (fully) test it
> > - I wanted to properly modify the test program cmd_read so as to allow
> > continuous acquisisitions
>
> Hi Alexis. Sorry for the late response. That's fine, I just wanted to be
> sure that the patch was not dropped by mistake. I'll test continuous
> output today and let you know if any other bugfix is necessary. I can
> also look into providing a patch for cmd_read and cmd_write.
If you want to test infinite acquisitions right now, you can clone my
git repository. I just pushed the modifications on it. I have not made
a pull request yet because I want to be sure there is no regression.
Your patch did not integrate fixes for both directions (read and
write). So, I had to modify it.
I also modified cmd_read; with the option -S set to 0, an infinite
acquisition will be configured.
Any patch from you is welcome (cmd_write or anything else), so do not
hesitate to send them.
>
> Cheers,
> --
> Daniele
--
Alexis.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Xenomai-core] [PULL REQUEST] analogy: bug fixes
2010-03-24 23:44 ` Alexis Berlemont
@ 2010-03-25 0:05 ` Daniele Nicolodi
2010-03-25 13:46 ` Daniele Nicolodi
0 siblings, 1 reply; 13+ messages in thread
From: Daniele Nicolodi @ 2010-03-25 0:05 UTC (permalink / raw)
To: Alexis Berlemont; +Cc: xenomai-core
Alexis Berlemont wrote:
> If you want to test infinite acquisitions right now, you can clone my
> git repository. I just pushed the modifications on it. I have not made
> a pull request yet because I want to be sure there is no regression.
Thanks! I'll test it as soon as possible.
I think I just stumbled into the ring buffer bug you fixed in your
repository :-) It took me a while to understand if the problem was in
the hardware, in my code, or somewhere else in the stack...
Now I just have to find where the carpenters broke the cable that brings
internet connection to my lab and fix it... :-(
Cheers,
--
Daniele
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Xenomai-core] [PULL REQUEST] analogy: bug fixes
2010-03-25 0:05 ` Daniele Nicolodi
@ 2010-03-25 13:46 ` Daniele Nicolodi
2010-03-28 22:47 ` Alexis Berlemont
0 siblings, 1 reply; 13+ messages in thread
From: Daniele Nicolodi @ 2010-03-25 13:46 UTC (permalink / raw)
To: Alexis Berlemont; +Cc: xenomai-core
Daniele Nicolodi wrote:
> Alexis Berlemont wrote:
>> If you want to test infinite acquisitions right now, you can clone my
>> git repository. I just pushed the modifications on it. I have not made
>> a pull request yet because I want to be sure there is no regression.
>
> Thanks! I'll test it as soon as possible.
I'm testing it now.
> I think I just stumbled into the ring buffer bug you fixed in your
> repository :-) It took me a while to understand if the problem was in
> the hardware, in my code, or somewhere else in the stack...
Unfortunately my ring buffer problem is not fixed by you patch. What I'm
experiencing is exposed by this (pseudo) code:
a4l_open(dsc, device)
a4l_mmap(dsc, subdevice, bufsize, &map)
a4l_snd_command(dsc, cmd)
/* preload buffer */
written = write_to_buffer(map, bufsize)
/* send internal trigger */
a4l_snd_insn(dsc,
cnt = 0;
while (1)
a4l_mark_bufrw(dsc, subdevice, written, towrite);
cnt += written;
/* 1 */
written = write_buffer(map + (cnt % bufsize), towrite)
The problem is that at the place marked with (1) the total extension of
the buffer region that gets written exceeds the ring buffer allocated
memory. That is ((cnt % bufsize) + towrite) > bufsize !
I do not know if this should be handled in my code, or in the driver.
This situation is not handled in the cmd_write example code (where a
simple memcpy() is done).
What do you think?
Cheers,
--
Daniele
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Xenomai-core] [PULL REQUEST] analogy: bug fixes
2010-03-25 13:46 ` Daniele Nicolodi
@ 2010-03-28 22:47 ` Alexis Berlemont
2010-03-29 18:02 ` Daniele Nicolodi
0 siblings, 1 reply; 13+ messages in thread
From: Alexis Berlemont @ 2010-03-28 22:47 UTC (permalink / raw)
To: Daniele Nicolodi; +Cc: xenomai-core
Hi,
Sorry for the late reply.
Daniele Nicolodi wrote:
> Daniele Nicolodi wrote:
> > Alexis Berlemont wrote:
> >> If you want to test infinite acquisitions right now, you can clone my
> >> git repository. I just pushed the modifications on it. I have not made
> >> a pull request yet because I want to be sure there is no regression.
> >
> > Thanks! I'll test it as soon as possible.
>
> I'm testing it now.
>
> > I think I just stumbled into the ring buffer bug you fixed in your
> > repository :-) It took me a while to understand if the problem was in
> > the hardware, in my code, or somewhere else in the stack...
>
> Unfortunately my ring buffer problem is not fixed by you patch. What I'm
> experiencing is exposed by this (pseudo) code:
>
> a4l_open(dsc, device)
> a4l_mmap(dsc, subdevice, bufsize, &map)
> a4l_snd_command(dsc, cmd)
>
> /* preload buffer */
> written = write_to_buffer(map, bufsize)
>
> /* send internal trigger */
> a4l_snd_insn(dsc,
>
> cnt = 0;
> while (1)
> a4l_mark_bufrw(dsc, subdevice, written, towrite);
> cnt += written;
> /* 1 */
> written = write_buffer(map + (cnt % bufsize), towrite)
>
>
> The problem is that at the place marked with (1) the total extension of
> the buffer region that gets written exceeds the ring buffer allocated
> memory. That is ((cnt % bufsize) + towrite) > bufsize !
>
> I do not know if this should be handled in my code, or in the driver.
> This situation is not handled in the cmd_write example code (where a
> simple memcpy() is done).
There is a bug in cmd_write and cmd_read. I have should have taken
into account the buffers edges. I will fix it. The function
a4l_mark_bufrw() is not designed to handle boundaries, that is why its
arguments represent data size not addresses.
>
> What do you think?
>
> Cheers,
> --
> Daniele
--
Alexis.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Xenomai-core] [PULL REQUEST] analogy: bug fixes
2010-03-28 22:47 ` Alexis Berlemont
@ 2010-03-29 18:02 ` Daniele Nicolodi
0 siblings, 0 replies; 13+ messages in thread
From: Daniele Nicolodi @ 2010-03-29 18:02 UTC (permalink / raw)
To: Alexis Berlemont; +Cc: xenomai-core
Alexis Berlemont wrote:
> There is a bug in cmd_write and cmd_read. I have should have taken
> into account the buffers edges. I will fix it. The function
> a4l_mark_bufrw() is not designed to handle boundaries, that is why its
> arguments represent data size not addresses.
That makes sense. I can provide a patch for cmd_read and cmd_write, as i
got the same kind of code working in my own test programs, but I'm quite
busy right now...
Cheers,
--
Daniele
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Xenomai-core] [PULL REQUEST] analogy bug fixes
@ 2010-07-07 23:13 Alexis Berlemont
2010-07-08 9:14 ` Gilles Chanteperdrix
0 siblings, 1 reply; 13+ messages in thread
From: Alexis Berlemont @ 2010-07-07 23:13 UTC (permalink / raw)
To: xenomai
The following changes since commit 653a38669af4427471ed8cdd129eb0bbb33ba178:
nucleus: finalize heap mapping sanitization (2010-07-04 18:57:54 +0200)
are available in the git repository at:
git://git.xenomai.org/xenomai-abe.git analogy ..BRANCH.NOT.VERIFIED..
Alexis Berlemont (48):
analogy: change the context's role (broken)
analogy: the buffer structure is now the central field of a4l_context (broken)
analogy: the subdevice structure got a new status field (broken)
analogy: the transfer structure is left with a minimal role (broken)
analogy: first draft of buffer initialization functions (broken)
analogy: adapt open, r/w, select and ioctl functions (broken)
analogy: adapt a4l_set_dev() after a4l_context's overhaul (broken)
analogy: update a4l_set_dev() declaration (broken)
analogy: update comments on a4l_context (broken)
analogy: changes related with subdevice's status field (broken)
analogy: replace transfer setup functions with buffer setup ones (broken)
analogy: update cancel functions (broken)
analogy: rewrite the cancel ioctl handler (broken)
analogy: fix bulk flag declaration in buffer.h (broken)
analogy: update a4l_read and a4l_write (broken)
analogy: update all a4l_buf_* functions (broken)
analogy: last updates in the buffer part (broken)
analogy: cosmetic changes (broken)
analogy: declare the reserve / release functions at the subd level (broken)
analogy: update a4l_get_minor function (broken)
analogy: update a4l_set_dev and remove useless info traces (broken)
analogy: use rtdm_context_to_private (broken)
analogy: minor fix in the subdevice structure declaration
analogy: add some helper macros to test the subdevice's characteristics
analogy: remove useless functions in the subdevice part
analogy: fix the buffer syscalls (ioctl + r/w) after buffer review (broken)
analogy: fix the declaration of the structure a4l_context (broken)
analogy: fix compilation issues and review the mmap ioctl handler (broken)
analogy: cosmetic change (broken)
analogy: fix buffer's compilation issues (broken)
analogy: prettify some subdevice tests (broken)
analogy: [pcimio] fix a huge hack in the mite initialization (broken)
analogy: fix the last compilation problems
analogy: fix a missing setting of the buf field in subdevice (broken)
analogy: fix the subdevice status management
analogy: fix buffer initialization/cleanup calls at open/close times
analogy: [loop] add a debug trace when trigger is called
analogy: fix test of subdevice status in a4l_write
analogy: [fake - loop] remove volatile keywords
analogy: add a detail in a4l_close doxygen doc
analogy: add an arbitrary sleep in cmd_write before closing the device
analogy: [ni_pcimio] really minor changes
analogy: [ni_pcimio] add the missing allocation of the digital ring
analogy: [ni_pcimio] fix timeout value in digital trigger
analogy: remove a4l_subd_is_busy calls in analogy core
analogy: remove calls of a4l_release/reserve_subd in the core
analogy: remove some tests which become with the buffer overhaul
analogy: fix a bug in a4l_fill_desc() when called on an idle device
include/analogy/buffer.h | 72 ++-
include/analogy/context.h | 37 +-
include/analogy/device.h | 7 +-
include/analogy/subdevice.h | 47 ++-
include/analogy/transfer.h | 17 +-
ksrc/drivers/analogy/buffer.c | 629 +++++++++++---------
ksrc/drivers/analogy/command.c | 55 +-
ksrc/drivers/analogy/device.c | 51 +--
ksrc/drivers/analogy/driver_facilities.c | 4 +-
ksrc/drivers/analogy/instruction.c | 11 +-
.../analogy/national_instruments/mio_common.c | 39 +-
ksrc/drivers/analogy/national_instruments/mite.c | 10 +-
ksrc/drivers/analogy/national_instruments/mite.h | 2 +-
ksrc/drivers/analogy/national_instruments/pcimio.c | 2 +
ksrc/drivers/analogy/rtdm_interface.c | 137 +++---
ksrc/drivers/analogy/subdevice.c | 12 +-
ksrc/drivers/analogy/testing/fake.c | 12 +-
ksrc/drivers/analogy/testing/loop.c | 22 +-
ksrc/drivers/analogy/transfer.c | 274 +--------
src/drvlib/analogy/descriptor.c | 14 +
src/utils/analogy/cmd_write.c | 3 +
21 files changed, 655 insertions(+), 802 deletions(-)
--
Alexis.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Xenomai-core] [PULL REQUEST] analogy bug fixes
2010-07-07 23:13 [Xenomai-core] [PULL REQUEST] analogy bug fixes Alexis Berlemont
@ 2010-07-08 9:14 ` Gilles Chanteperdrix
2010-07-09 13:15 ` Alexis Berlemont
0 siblings, 1 reply; 13+ messages in thread
From: Gilles Chanteperdrix @ 2010-07-08 9:14 UTC (permalink / raw)
To: Alexis Berlemont; +Cc: xenomai
Alexis Berlemont wrote:
> The following changes since commit 653a38669af4427471ed8cdd129eb0bbb33ba178:
>
> nucleus: finalize heap mapping sanitization (2010-07-04 18:57:54 +0200)
Ok. Could you rebase on the current master? The commit message would be:
"Update autotools files"
--
Gilles.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Xenomai-core] [PULL REQUEST] analogy bug fixes
2010-07-08 9:14 ` Gilles Chanteperdrix
@ 2010-07-09 13:15 ` Alexis Berlemont
0 siblings, 0 replies; 13+ messages in thread
From: Alexis Berlemont @ 2010-07-09 13:15 UTC (permalink / raw)
To: Gilles Chanteperdrix; +Cc: xenomai
Hi,
Gilles Chanteperdrix wrote:
> Alexis Berlemont wrote:
> > The following changes since commit 653a38669af4427471ed8cdd129eb0bbb33ba178:
> >
> > nucleus: finalize heap mapping sanitization (2010-07-04 18:57:54 +0200)
>
> Ok. Could you rebase on the current master? The commit message would be:
> "Update autotools files"
Sorry for the delay. That should be better now.
>
> --
> Gilles.
--
Alexis.
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2010-07-09 13:15 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-07 23:13 [Xenomai-core] [PULL REQUEST] analogy bug fixes Alexis Berlemont
2010-07-08 9:14 ` Gilles Chanteperdrix
2010-07-09 13:15 ` Alexis Berlemont
-- strict thread matches above, loose matches on Subject: below --
2010-03-20 0:28 [Xenomai-core] [PULL REQUEST] analogy: " Alexis Berlemont
2010-03-20 12:56 ` Daniele Nicolodi
2010-03-21 20:59 ` Alexis Berlemont
2010-03-24 10:48 ` Daniele Nicolodi
2010-03-24 23:44 ` Alexis Berlemont
2010-03-25 0:05 ` Daniele Nicolodi
2010-03-25 13:46 ` Daniele Nicolodi
2010-03-28 22:47 ` Alexis Berlemont
2010-03-29 18:02 ` Daniele Nicolodi
2010-01-15 0:51 Alexis Berlemont
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.