Re: [comedi] ni_pcimio does not support attach using comedi_config

Ian Abbott <[email protected]> Mon, 3 Jul 2023 11:08:52 +0100
Newsgroups gmane.linux.comedi
Organization MEV Ltd.
Message-ID <[email protected]>
On 01/07/2023 00:35, Random Stuff wrote:
> Thank you very much for the detailed response. I'm not getting any=20
> output from "lspci -v -n -d 1093:" =E2=80=94 does that mean my computer d=
oesn't=20
> physically detect a PCI?
>=20
> $ lspci -v -n -d 1093:
> $

It means it could not find a PCI device that matches NI's PCI Vendor ID,=20
but I would expect an NI PCI-6014 to use NI's vendor ID!  If you omit=20
the `-d 1093:` it will list all PCI devices.

> In any case, here is the output I get from "sudo modinfo --filename=20
> comedi comedi_fc ni_pcimio" and "dmesg"
>=20
> $ sudo modinfo --filename comedi comedi_fc ni_pcimio
> /lib/modules/4.4.0-210-generic/kernel/drivers/staging/comedi/comedi.ko
> /lib/modules/4.4.0-210-generic/comedi/drivers/comedi_fc.ko
> /lib/modules/4.4.0-210-generic/kernel/drivers/staging/comedi/drivers/ni_p=
cimio.ko

It looks like you *do* have a mixture of the two sets of comedi modules=20
installed.  The ones in "/lib/modules/$(uname=20
-r)/kernel/drivers/staging" are the ones built from Linux kernel sources=20
(and since this looks like an Ubuntu or Linux Mint kernel, probably=20
installed by a "linux-modules-extra" package).  The ones in=20
"/lib/modules/$(uname -r)/comedi" are the ones built from the comedi git=20
repository.

You can't really have both sets installed.  Given the choice, I would=20
prefer the ones built from the Linux kernel sources, not the ones built=20
from the comedi git repository.

>=20
> $ dmesg
[snip]
> *[86380.615473] comedi comedi0: driver 'ni_pcimio' does not support=20
> attach using comedi_config*

Indeed, the ni_pcimio built from the Linux kernel sources (which is the=20
one that got matched first in the module path) does not support manual=20
configuration using comedi_config (since kernel version 3.10).

> Do you recommend deleting all comedi folders I have on my machine and=20
> re-installing using the github comedi modules since they support manual=
=20
> configuration?  If so, should I be following these instructions=20
> <https://github.com/Linux-Comedi/comedi/blob/master/INSTALL>, and where=
=20
> is the
> recommended directory where I should git pull? Thanks again for taking a=
=20
> look at this, I really appreciate it.

Manual configuration with comedi_config would not help anyway if a=20
matching PCI device cannot be detected in the system.  I would recommend=20
using the Linux kernel "staging" modules, even though they do not=20
support manual configuration of most PCI devices.

What we need to work out is why no PCI device with NI's PCI vendor ID=20
has been listed by lspci.


Regards,
Ian



> On Fri, Jun 30, 2023 at 4:28=E2=80=AFAM Ian Abbott <[email protected]=20
> <mailto:[email protected]>> wrote:
>=20
>     On 30/06/2023 01:29, Random Stuff wrote:
>      > Hello everyone,
>      >
>      > I'm using a National Instruments PCI-6014 188626D-01 daq and
>     trying to
>      > run comedi_config to setup the daq. Initially, I kept getting the
>      > "comedi.o not loaded" error and fixed it by setting autoconfig=3D0=
.
>      > However now, I'm getting the following error:
>      >
>      > configuring driver=3Dni_pcimio 0,0,0,0,0,...0,0,0
>      > Configure failed!: Input/output error
>      > Check kernel log for more information
>      > Possible reasons for failure:
>      >=C2=A0 =C2=A0 Driver not found
>      >
>      > If I check kernel logs using "dmesg", I see: "comedi comedi0: driv=
er
>      > ni_pcimio does not support attach using comedi_config" multiple
>     times as
>      > well as a few comedi_fc errors regarding unkown symbols. Let me
>     know if
>      > you'd like me to send over the full dmesg output, but it is quite
>     large.
>      > Let me know if any further information is required, as I'm quite
>     new to
>      > this.
>      >
>      > Thanks!
>=20
>     It sounds like you *might* have a mixture of the two mutually
>     incompatible sets of comedi modules installed on your system, but
>     perhaps not.=C2=A0 By the two mutually incompatible sets of comedi
>     modules, I
>     mean:
>=20
>     1. The set of comedi modules built from sources at
>     https://github.com/Linux-Comedi/comedi.git
>     <https://github.com/Linux-Comedi/comedi.git> (if you have done that).
>     These were previously hosted on comedi.org <http://comedi.org> so I
>     will refer to them as
>     the "comedi.org <http://comedi.org>" comedi modules.
>=20
>     2. The set of comedi modules included with the Linux kernel image
>     packages, or perhaps in an "extra modules" package.=C2=A0 I will refe=
r to
>     them as the "Linux" comedi modules.
>=20
>     The modules from set 2 (the "Linux" comedi modules) removed the suppo=
rt
>     for manually configuration from most of the PCI and USB drivers a lon=
g
>     time ago, and also removed "comedi_fc" as a separate module,
>     incorporating its functions into the main "comedi" module.
>     Auto-configuration was removed from the "ni_pcimio" driver in kernel
>     version 3.10.=C2=A0 The "comedi_fc" module was removed in kernel vers=
ion
>     3.18.
>=20
>     The modules from set 1 (the "comedi.org <http://comedi.org>" comedi
>     modules) still support
>     manual configuration of PCI and USB devices and still has the
>     "comedi_fc" module.
>=20
>     The usual reason auto-configuration doesn't work is when there is a
>     variant of the card with different PCI ID information that the driver=
's
>     device ID table does not match.=C2=A0 That has happened before with N=
I cards.
>=20
>     The following info would be useful:
>=20
>     1. The output from: lspci -v -n -d 1093:
>      =C2=A0 =C2=A0 (That will list info about PCI devices matching NI's P=
CI vendor
>     ID.)
>=20
>     2. The output from: sudo modinfo --filename comedi comedi_fc ni_pcimi=
o
>      =C2=A0 =C2=A0 (That will show the paths of various comedi modules.)
>=20
>     3. Your "dmesg" output, preferably with bits unrelated to comedi
>     removed.
>=20
>     Regards,
>     Ian
>=20
>     --=20
>     -=3D( Ian Abbott <[email protected] <mailto:[email protected]>> || ME=
V
>     Ltd. is a company=C2=A0 )=3D-
>     -=3D( registered in England & Wales.=C2=A0 Regd. number: 02862268.=C2=
=A0 )=3D-
>     -=3D( Regd. addr.: S11 & 12 Building 67, Europa Business Park, )=3D-
>     -=3D( Bird Hall Lane, STOCKPORT, SK3 0XA, UK. || www.mev.co.uk
>     <http://www.mev.co.uk> )=3D-
>=20
> --=20
> You received this message because you are subscribed to the Google=20
> Groups "Comedi: Linux Control and Measurement Device Interface" group.
> To unsubscribe from this group and stop receiving emails from it, send=20
> an email to [email protected]=20
> <mailto:[email protected]>.
> To view this discussion on the web visit=20
> https://groups.google.com/d/msgid/comedi_list/CANgQxoEzMAwR0hUVETo-O1idBr=
dxWDFPjitx1vk1cQJx4OLJPQ%40mail.gmail.com <https://groups.google.com/d/msgi=
d/comedi_list/CANgQxoEzMAwR0hUVETo-O1idBrdxWDFPjitx1vk1cQJx4OLJPQ%40mail.gm=
ail.com?utm_medium=3Demail&utm_source=3Dfooter>.

--=20
-=3D( Ian Abbott <[email protected]> || MEV Ltd. is a company  )=3D-
-=3D( registered in England & Wales.  Regd. number: 02862268.  )=3D-
-=3D( Regd. addr.: S11 & 12 Building 67, Europa Business Park, )=3D-
-=3D( Bird Hall Lane, STOCKPORT, SK3 0XA, UK. || www.mev.co.uk )=3D-

--=20
You received this message because you are subscribed to the Google Groups "=
Comedi: Linux Control and Measurement Device Interface" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/=
comedi_list/2cee0c70-6a00-8504-ec10-bd236c736ff2%40mev.co.uk.