Re: ni_usb with multiple devices

Frank Mori Hess <[email protected]>
Newsgroups gmane.linux.hardware.gpib.general
Message-ID <CAJz5OpfuZ+0yhMCKPcNO56L72BcQ7=7=feybFAjHdrAfdFZ9Xg@mail.gmail.com>
On Thu, Dec 6, 2018 at 8:33 PM Frank Mori Hess <[email protected]> wrote:
>
> On Thu, Dec 6, 2018 at 2:46 AM dave penkler <[email protected]> wrote:
> >
> > BTW there is support for multiple cards in the USB hotplug scripts. See cut and paste from INSTALL below:
> >
> > Using multiple-boards of the same type with hotplug requires
> > udev support: In the hotplug scripts you can use either the
> > serial number $SERIAL or the device path $DEVPATH to decide
>
> It doesn't seem robust though, for example during boot when two
> devices may appear nearly simultaneously.  Really, the SERIAL/DEVPATH
> should be passed to gpib_config and the driver would use them to
> verify it has found the correct board.

Ok, I looked into this a bit more, the drivers can use
kobject_get_path() to get the DEVPATH on the kernel side.  I'm
thinking of just replacing the "device tree path" stuff I added with a
more generic support for specifying hardware by DEVPATH.  Probably no
one has started using the "device tree path" stuff yet (it only works
with the fmh_gpib driver) so changing it won't break anyone's code.

-- 
Frank
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.