All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexis Berlemont <berlemont.hauw@domain.hid>
To: Stefan Schaal <sschaal@domain.hid>
Cc: Peter Pastor Sampedro <pastorsa@domain.hid>, xenomai@xenomai.org
Subject: Re: [Xenomai-core] Analogy DIO speed
Date: Thu, 04 Mar 2010 00:58:27 +0100	[thread overview]
Message-ID: <4B8EF7A3.2080500@domain.hid> (raw)
In-Reply-To: <4F095F5B-0A5E-40D2-AC8E-F99034E9571A@usc.edu>

Hi Stefan,

Sorry for the late reply, I was unavailable yesterday.

Stefan Schaal wrote:
> Hi Alexis,
> 
>  we pulled your analogy branch, and now cmd_write works. Great, and thanks a lot! Next, I tried to use commands with the digital IO subdevice on our board (subdevice #2), but the get an error message:
> 
> 
> [ 2482.771913] Analogy: a4l_check_cmddesc: scan_begin_src, trigger unsupported
Unfortunately, cmd_write was not designed to work with digital
subdevices; the command's fields are not appropriate, I am trying to
make it work quite quickly.

> 
> 
> Is there just missing support for the DIO subdevices using commands?
> 
> Best wishes,
> 
> -Stefan
> 
> 
> ps.: feel free to use our machine for debugging -- it now has the latest version of your software installed with linux kernel 2.6.29.5.
> 
> 
> 
> 
> 
> On Feb 28, 2010, at 16:24, Alexis Berlemont wrote:
> 
>> Alexis Berlemont wrote:
>>> Hi,
>>> Stefan Schaal wrote:
>>>> Hi Alexis,
>>>>
>>>> On Feb 18, 2010, at 14:34, Alexis Berlemont wrote:
>>>>
>>>>> I have some problems with
>>>>>> implementing commands on my NI6259 so far.
>>>>> Could you remind me what was the problem ?
>>>> See the print-outs below for the problem we have.
>>>>
>>>> Thanks so much for looking into this!
>>>>
>>>> -Stefan
>>>>
>>>>
>>>>
>>>>
>>>> Using the cmd_write() function that you provide in analogy, we get the following problem:
>>>>
>>> I am currently trying to fix this bug, which is not that easy. I just
>>> have one question (that I remember I have already asked you in some way,
>>> but I just want to be sure):
>>> Does this bug occur the very first time you launched cmd_write (I mean
>>> after a reboot) ?
>>>
>> I managed at last to fix the bug you were facing (at least I hope so).
>> The problem was located in the trigger callback which waited for a
>> bit-status (fifo half full) before going further; however, sometimes the
>> DMA interrupt already occurred and cleaned everything behind your back.
>>
>> I have not made a pull request because the current implementation is not
>> perfect.
>>
>> If you have some time, could you clone my git repository (branch:
>> analogy) and check that a simple call to cmd_write does not trigger the
>> bug anymore ?
>>
>> Many thanks.
>>>> root@domain.hid# ./cmd_write -v
>>>> cmd_write: device analogy0 opened (fd=0)
>>>> cmd_write: basic descriptor retrieved
>>>>    subdevices count = 14
>>>>    read subdevice index = 0
>>>>    write subdevice index = 1
>>>> cmd_write: complex descriptor retrieved
>>>> cmd_write: channel 0
>>>>    ranges count = 3
>>>>    range's size = 16 (bits)
>>>> cmd_write: channel 1
>>>>    ranges count = 3
>>>>    range's size = 16 (bits)
>>>> cmd_write: scan size = 4
>>>> cmd_write: size to write  = 400
>>>> cmd_write: command successfully sent
>>>> cmd_write: triggering failed (ret=-32)
>>>>
>>>> root@domain.hid# dmesg -c
>>>> [133345.213865] Analogy: analogy_ni_pcimio: ni_mio_common: interrupt: b_status=0002 m1_status=80a80000
>>>> [133345.332719] Analogy: analogy_ni_pcimio: ni_ao_wait_for_dma_load: timed out waiting for dma load<3>Analogy: a4l_do_special_insn: execution of the instruction failed (err=-32)
>>>>
>>>>
>>>> Another problem we have is with the --mmap option:
>>>>
>>>> root@domain.hid# ./cmd_write -v --mmap
>>>> cmd_write: device analogy0 opened (fd=0)
>>>> cmd_write: basic descriptor retrieved
>>>>    subdevices count = 14
>>>>    read subdevice index = 0
>>>>    write subdevice index = 1
>>>> cmd_write: complex descriptor retrieved
>>>> cmd_write: channel 0
>>>>    ranges count = 3
>>>>    range's size = 16 (bits)
>>>> cmd_write: channel 1
>>>>    ranges count = 3
>>>>    range's size = 16 (bits)
>>>> cmd_write: scan size = 4
>>>> cmd_write: size to write  = 400
>>>> cmd_write: buffer size = 65536 bytes
>>>> cmd_write: a4l_mmap() failed (ret=-22)
>>>>
>>>>
>>>> root@domain.hid# dmesg -c
>>>> [133408.942998] Analogy: a4l_ioctl_mmap: mmap not allowed on this subdevice
>>>>
>>>>
>>> Alexis.
>> Alexis.
>>
> 
> 
Alexis.


  reply	other threads:[~2010-03-03 23:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-17 21:23 [Xenomai-core] Analogy DIO speed Stefan Schaal
2010-02-18 22:34 ` Alexis Berlemont
2010-02-18 22:48   ` Thomas Lockhart
2010-02-19  5:43   ` Stefan Schaal
2010-02-23 23:22     ` Alexis Berlemont
2010-03-01  0:24       ` Alexis Berlemont
2010-03-02 18:00         ` Stefan Schaal
2010-03-03 23:58           ` Alexis Berlemont [this message]
2010-03-04  0:54             ` Stefan Schaal
2010-03-04  8:37               ` Alexis Berlemont

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=4B8EF7A3.2080500@domain.hid \
    --to=berlemont.hauw@domain.hid \
    --cc=pastorsa@domain.hid \
    --cc=sschaal@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.