All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wojciech Domski <wojciech.domski@gmail.com>
To: Jorge Ramirez Ortiz <jro@xenomai.org>, xenomai@xenomai.org
Subject: Re: [Xenomai] sensoray 626 patch  [Re: Xenomai Digest, Vol 27, Issue 12]
Date: Thu, 17 Jul 2014 20:59:09 +0200	[thread overview]
Message-ID: <53C81CFD.30908@gmail.com> (raw)
In-Reply-To: <53C6CC9B.4040009@xenomai.org>

W dniu 2014-07-16 21:03, Jorge Ramirez Ortiz pisze:
>
>>>>  Thank you for committing the driver.
>>>>  I have access to the Sensoray 626 board and I will test the 
>>>> remarks you have
>>>>  proposed. It will take me sometime, however. First of all I would 
>>>> like to test my
>>>>  driver with two Sensoray boards. For now, I see that it won't work 
>>>> with more than
>>>>  one card. It requires some changes to the attach and probe 
>>>> function. After I
>>>>  implement this functionality I will take a look into the interrupt 
>>>> handling service.
>>>>
>>>>  Seizing the opportunity, I would like to ask you a question about 
>>>> handling PCI
>>>>  device. When I'm calling pci_register_driver() and I have two 
>>>> exactly the same PCI
>>>>  devices will this function call appropriate probe() function two 
>>>> times? If yes,
>>>>  then is the probe() function an appropriate place to make list of 
>>>> available devices?
>>>>
>>>>  Wojciech Domski
>>>>
>>>>  Domski.pl
>>>>
>>>>  Wojciech.Domski.pl
>>>>
>>>
>>>  invoking pci_register_driver in dev_s626_attach causes the probe 
>>> interface in the
>>>  pci driver to be executed for all the devices of the kind described 
>>> in the pci id
>>>  table; this is probably the reason why you can only register one.
>>>
>>
>> of course, in case it was not clear, you can only register the pci 
>> driver once
>>
>>>  It might be easier to follow the approach in 
>>> analogy/national_instruments/mite.c
>
>
> please have a look to the changes I pushed (untested). let me know if 
> it helps with your issues.
> http://git.xenomai.org/xenomai-jro.git/log/?h=sensoray
>
> [note that this driver is still very much work in progress but I 
> thought you'll need it sooner rather than later]
>
>>>
>>>  mite_init registers the driver which ends up calling mite_probe 
>>> which will create a
>>>  mite_struct and add it to the list of mite_devices.
>>>  Incidentally if you were wondering, this is the reason why if the
>>>  pci_register_driver call succeeded the driver can display all the 
>>> devices in the
>>>  system.
>>>
>>>  the same would need to be done for the s626
>>>
>>>  on a different note, we are adding a new interface to rtdm to 
>>> support the busy loops.
>>>  rtdm_busywait_safe(__condition, __busy_delay, __busy_wait)
>>>
>>>  this should allow you to do things like this
>>>
>>>  -       while (!MC_TEST(P_MC2, MC2_UPLD_DEBI))
>>>  -               rtdm_task_sleep(2000);
>>>  +       ret = rtdm_busywait_safe(!MC_TEST(P_MC2, MC2_UPLD_DEBI), 
>>> BUSY_DELAY,
>>>  BUSY_SLEEP);
>>>  +       if (ret)
>>>  +               __a4l_err( "error waiting");
>>>
>>>
>>
>
Today I have tested the driver against working with multiple Sensoray 
626 cards.
However, there are still some issues with I have to deal with.

The patch which you have Jorge delivered was of much help to me. 
However, there were some issues which I had to fix. Really minor stuff.

As for the irq service I didn't have time to check it because I'm 
running Xenomai 2.6.3.

Wojciech Domski

Domski.pl

Wojciech.Domski.pl



  parent reply	other threads:[~2014-07-17 18:59 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.653.1404749254.5713.xenomai@xenomai.org>
2014-07-14 14:18 ` [Xenomai] analogy: sensory 626 patch [Re: Xenomai Digest, Vol 27, Issue 12] Jorge Ramirez Ortiz
2014-07-14 19:09   ` Wojciech Domski
2014-07-14 21:07     ` Jorge Ramirez Ortiz
2014-07-14 21:43       ` Jorge Ramirez Ortiz
2014-07-16 19:03         ` [Xenomai] sensoray " Jorge Ramirez Ortiz
2014-07-16 19:48           ` Wojciech Domski
2014-07-17 18:59           ` Wojciech Domski [this message]
2014-07-17 19:54             ` Jorge Ramirez Ortiz
2014-07-31  9:22               ` Wojciech Domski
2014-07-31 20:14                 ` Jorge Ramirez Ortiz
2014-08-01 11:33                   ` Wojciech Domski
2014-08-01 14:48                     ` Jorge Ramirez Ortiz
2014-08-05  9:20                       ` Wojciech Domski
2014-08-05 10:01                         ` Wojciech Domski
2014-08-12  1:25                           ` Jorge Ramirez Ortiz
2014-08-15 20:31                             ` Jorge Ramirez Ortiz
2014-09-09  9:31                               ` Wojciech Domski
2014-09-10  0:18                                 ` Jorge Ramirez Ortiz
2014-09-24 19:57                                 ` Jorge Ramirez Ortiz

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=53C81CFD.30908@gmail.com \
    --to=wojciech.domski@gmail.com \
    --cc=jro@xenomai.org \
    --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.