NI card not being recognized

62 views
Skip to first unread message

Tim Vruwink

unread,
Aug 24, 2017, 3:47:31 PM8/24/17
to Comedi: Linux Control and Measurement Device Interface
Hi -
I've got a server with two National Instrument cards, running RTAI and Comedi.  It was a semi-automated setup, so I didn't actually see how the cards were setup, but apparently one of the cards isn't working.
I am trying to determine what the problem might be - however I have very little experience with comedi.


lspci shows:
( irq = 17 )comedi0: ni_pcimio: possible problem - never saw adc go busy?
comedi0: ni_pcimio: possible problem - never saw adc go busy?

dmesg shows:
 ( irq = 17 )comedi0: ni_pcimio: possible problem - never saw adc go busy?
comedi0: ni_pcimio: possible problem - never saw adc go busy?

/proc/comedi shows:

comedi version 0.7.76
format string: "%2d: %-20s %-20s %4d",i,driver_name,board_name,n_subdevices
 0: ni_pcimio            pci-6713               14
ni_pcimio:
 ni_pcimio
8255:
 8255

Not sure what the error message about adc going busy means.  If anyone has some insights that would be helpful.

Thank you.
Tim

Tim Vruwink

unread,
Aug 24, 2017, 4:06:37 PM8/24/17
to Comedi: Linux Control and Measurement Device Interface
Updated with the correct lspci output.


On Thursday, August 24, 2017 at 2:47:31 PM UTC-5, Tim Vruwink wrote:
Hi -
I've got a server with two National Instrument cards, running RTAI and Comedi.  It was a semi-automated setup, so I didn't actually see how the cards were setup, but apparently one of the cards isn't working.
I am trying to determine what the problem might be - however I have very little experience with comedi.


lspci shows:

05:01.0 Class ff00: National Instruments Unknown device 70aa
05:02.0 Class ff00: National Instruments PCI-6713

Ian Abbott

unread,
Aug 29, 2017, 6:58:06 AM8/29/17
to comed...@googlegroups.com
On 24/08/17 21:06, Tim Vruwink wrote:
> Updated with the correct lspci output.
>
> On Thursday, August 24, 2017 at 2:47:31 PM UTC-5, Tim Vruwink wrote:
>
> Hi -
> I've got a server with two National Instrument cards, running RTAI
> and Comedi. It was a semi-automated setup, so I didn't actually see
> how the cards were setup, but apparently one of the cards isn't working.
> I am trying to determine what the problem might be - however I have
> very little experience with comedi.
>
>
> lspci shows:
>
> 05:01.0 Class ff00: National Instruments Unknown device 70aa
> 05:02.0 Class ff00: National Instruments PCI-6713

National Instruments device 70aa is a PCI-6229 (comedi device name
"pci-6229", which ought to be supported by the comedi ni_pcimio driver.
I don't know why comedi isn't creating a device for it. Are there any
more clues from dmesg?

>
>
> dmesg shows:
> ( irq = 17 )comedi0: ni_pcimio: possible problem - never saw adc
> go busy?
> comedi0: ni_pcimio: possible problem - never saw adc go busy?
>
> /proc/comedi shows:
>
> comedi version 0.7.76
> format string: "%2d: %-20s %-20s
> %4d",i,driver_name,board_name,n_subdevices
> 0: ni_pcimio pci-6713 14
> ni_pcimio:
> ni_pcimio
> 8255:
> 8255
>
> Not sure what the error message about adc going busy means. If
> anyone has some insights that would be helpful.

I don't know if it is a real problem or not, but it is related to the
CS5529 calibration ADC on the PCI-6713. It has some code that loops
around 100 times waiting for a "busy" bit to be set, with a 1
microsecond (or so) delay between each check. The "possible problem"
message is produced if the "busy" bit has not been seen after those 100
iterations. The "busy" bit will clear by itself some time after it is
set, so it may the case that the code misses it, or perhaps it is not
waiting long enough.

Does the message appear every time you read the calibration ADC
(subdevice 8), or only during initialization?

--
-=( Ian Abbott @ MEV Ltd. E-mail: <abb...@mev.co.uk> )=-
-=( Web: http://www.mev.co.uk/ )=-
Message has been deleted
Message has been deleted

Tim Vruwink

unread,
Sep 7, 2017, 2:18:24 PM9/7/17
to Comedi: Linux Control and Measurement Device Interface

Possibly: I am seeing this:
Available NI device IDs: 0x1870 0x70aa
comedi0: ni_pcimio: pci-6713MITE:0xf7801000 mapped to f8896000 DAQ:0xf780
0000 mapped to f88e8000
mite: version = 1, type = 1, mite mode = 1, interface mode = 3
mite: num channels = 3, write post fifo depth = 1, wins = 0, iowins = 2
 ( irq = 19 )<3>IRQ handler type mismatch for IRQ 19
current handler: libata
 [<c044a8b4>] setup_irq+0x195/0x1ad
 [<f89fab0d>] ni_E_interrupt+0x0/0x4e3 [ni_pcimio]
 [<c044a9a8>] request_irq+0xdc/0xf9
 [<f89fab0d>] ni_E_interrupt+0x0/0x4e3 [ni_pcimio]
 [<f88f1914>] comedi_request_irq+0x2f/0xab [comedi]
 [<f89f819e>] pcimio_attach+0x5b3/0x11eb [ni_pcimio]
 [<c047413a>] do_lookup+0x4f/0x140
 [<c04762c3>] __link_path_walk+0xafa/0xc0d
 [<c042ee15>] call_usermodehelper_exec+0x61/0x6b
 [<f88f11dd>] comedi_device_attach+0xa1/0x349 [comedi]
 [<f88eeed2>] comedi_unlocked_ioctl+0x179/0x11f7 [comedi]
 [<c0459ed9>] __do_fault+0x2be/0x2ea
 [<f88eed59>] comedi_unlocked_ioctl+0x0/0x11f7 [comedi]
 [<c0478227>] do_ioctl+0x1f/0x64
 [<c04784a0>] vfs_ioctl+0x234/0x246
 [<c0414c68>] __ipipe_handle_exception+0x175/0x1b5
 [<c04784fe>] sys_ioctl+0x4c/0x66
 [<c0404f09>] sysenter_past_esp+0x6e/0x72
 =======================
comedi: cannot get unshared interrupt, will not use RT interrupts.

So this card (the 6713 or 6229?) is getting bumped by the ata controller off port 19.

I try manually configuring the card:
comedi_config /dev/comedi1 ni_pcimio

cat /proc/comedi now shows:

comedi version 0.7.76
format string: "%2d: %-20s %-20s %4d",i,driver_name,board_name,n_subdevices
 0: ni_pcimio            pci-6713               14
 1: ni_pcimio            pci-6229               14
ni_pcimio:
 ni_pcimio
8255:
 8255

and comedi_test --device /dev/comedi0 --realtime
comedi_test --device /dev/comedi1 --realtime
 seemingly spit out good reports.

My apologies for the wall of text...however, parsing through /var/log/messages is now showing:

Sep  7 10:26:18 eceb-040-01 kernel: comedi1: ni_pcimio:no device found
Sep  7 10:26:18 eceb-040-01 kernel: Available NI device IDs: 0x1870(used) 0x70aa
Sep  7 10:36:27 eceb-040-01 ntpd[2108]: kernel time sync status change 0001
Sep  7 10:36:58 eceb-040-01 kernel: comedi1: ni_pcimio: pci-6229MITE:0xf7803000 mapped to f89c6000 DAQ:0xf7802000 mapped to f89c8000
Sep  7 10:36:58 eceb-040-01 kernel: mite: version = 1, type = 4, mite mode = 1, interface mode = 3
Sep  7 10:36:58 eceb-040-01 kernel: mite: num channels = 8, write post fifo depth = 1, wins = 0, iowins = 2
Sep  7 10:36:58 eceb-040-01 kernel:  ( irq = 16 )<3>IRQ handler type mismatch for IRQ 16
Sep  7 10:36:58 eceb-040-01 kernel: current handler: ehci_hcd:usb1
Sep  7 10:36:58 eceb-040-01 kernel:  [setup_irq+405/429] setup_irq+0x195/0x1ad
Sep  7 10:36:58 eceb-040-01 kernel:  [<f89fab0d>] ni_E_interrupt+0x0/0x4e3 [ni_pcimio]
Sep  7 10:36:58 eceb-040-01 kernel:  [request_irq+220/249] request_irq+0xdc/0xf9
Sep  7 10:36:58 eceb-040-01 kernel:  [<f89fab0d>] ni_E_interrupt+0x0/0x4e3 [ni_pcimio]
Sep  7 10:36:58 eceb-040-01 kernel:  [<f88f1914>] comedi_request_irq+0x2f/0xab [comedi]
Sep  7 10:36:58 eceb-040-01 kernel:  [<f89f819e>] pcimio_attach+0x5b3/0x11eb [ni_pcimio]
Sep  7 10:36:58 eceb-040-01 kernel:  [do_lookup+79/320] do_lookup+0x4f/0x140
Sep  7 10:36:58 eceb-040-01 kernel:  [__link_path_walk+2810/3085] __link_path_walk+0xafa/0xc0d
Sep  7 10:36:58 eceb-040-01 kernel:  [call_usermodehelper_exec+97/107] call_usermodehelper_exec+0x61/0x6b
Sep  7 10:36:58 eceb-040-01 kernel:  [<f88f11dd>] comedi_device_attach+0xa1/0x349 [comedi]
Sep  7 10:36:58 eceb-040-01 kernel:  [<f88eeed2>] comedi_unlocked_ioctl+0x179/0x11f7 [comedi]
Sep  7 10:36:58 eceb-040-01 kernel:  [__do_fault+702/746] __do_fault+0x2be/0x2ea
Sep  7 10:36:58 eceb-040-01 kernel:  [<f88eed59>] comedi_unlocked_ioctl+0x0/0x11f7 [comedi]
Sep  7 10:36:58 eceb-040-01 kernel:  [do_ioctl+31/100] do_ioctl+0x1f/0x64
Sep  7 10:36:58 eceb-040-01 kernel:  [audit_syscall_entry+282/324] audit_syscall_entry+0x11a/0x144
Sep  7 10:36:58 eceb-040-01 kernel:  [vfs_ioctl+564/582] vfs_ioctl+0x234/0x246
Sep  7 10:36:58 eceb-040-01 kernel:  [sys_ioctl+76/102] sys_ioctl+0x4c/0x66
Sep  7 10:36:58 eceb-040-01 kernel:  [syscall_call+7/11] syscall_call+0x7/0xb
Sep  7 10:36:58 eceb-040-01 kernel:  =======================
Sep  7 10:36:58 eceb-040-01 kernel: comedi: cannot get unshared interrupt, will not use RT interrupts.
Sep  7 10:36:58 eceb-040-01 kernel:

Looking at: /proc/interrupts

           CPU0       CPU1
  0:         71          0   IO-APIC-edge      timer
  1:          3          0   IO-APIC-edge      i8042
  2:          0          0    XT-PIC-XT        cascade
  8:          0          0   IO-APIC-edge      rtc
 12:          4          0   IO-APIC-edge      i8042
 16:       2110          0   IO-APIC-fasteoi   ehci_hcd:usb1, ni_pcimio
 19:          2          0   IO-APIC-fasteoi   libata, ni_pcimio
 23:         30          0   IO-APIC-fasteoi   ehci_hcd:usb2
217:      10283          0   PCI-MSI-edge      eth2
218:        827          0   PCI-MSI-edge      eth1
219:       8968          0   PCI-MSI-edge      ahci


I can try moving the cards around...but I am at a bit of a losss here.

Also --

lspci -vv shows:

04:00.0 IDE interface: JMicron Technologies, Inc. JMB368 IDE controller (prog-if 85 [Master SecO PriO])
        Subsystem: JMicron Technologies, Inc. JMB368 IDE controller
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisI
NTx-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- IN
Tx-
        Latency: 0, Cache Line Size: 64 bytes
        Interrupt: pin A routed to IRQ 19

05:04.0 Class ff00: National Instruments Unknown device 70aa
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisI
NTx-
        Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
INTx-
        Latency: 32, Cache Line Size: 64 bytes
        Interrupt: pin A routed to IRQ 19
        Region 0: Memory at f7801000 (32-bit, non-prefetchable) [size=4K]
        Region 1: Memory at f7800000 (32-bit, non-prefetchable) [size=4K]
        Kernel modules: ni_pcimio

Both are sitting on IRQ 19 pin a.

Tim
Reply all
Reply to author
Forward
0 new messages