Re: Supporting two NI cards

On Tue, 2004-03-02 at 18:05, Frank Mori Hess wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On Tuesday 02 March 2004 03:02 pm, Daryl Warkentin wrote:
> > I have an NI 6034E ADC card, and an NI 6733 DAC card installed in the
> > same computer. To configure them I use the following commands:
> >
> > comedi_config /dev/comedi0 ni_pcimio 0,10
> > comedi_config /dev/comedi1 ni_pcimio 0,11
> >
> > The 0,10 refers to the bus and slot id of the 6034E and the 0,11 is for
> > the 6733. After configuration it seems that both comedi0 and comedi1
> > point to the first device configured. I have tried it both ways.
> >
> > How do I differentiate between two devices which use the same driver
> > name?
> 
> What you did should have worked.  What is the output of 'cat /proc/comedi' 
> and 'ls -l /dev/comedi*' ?

I added a few more commands just to be clear.

[root_at_sed-40 tester]# /sbin/lsmod
Module                  Size  Used by    Not tainted
es1371                 29356   1  (autoclean)
ac97_codec             17172   0  (autoclean) [es1371]
gameport                3364   0  (autoclean) [es1371]
soundcore               6468   4  (autoclean) [es1371]
ide-cd                 35648   0  (autoclean)
cdrom                  33280   0  (autoclean) [ide-cd]
mga                   103484   2
agpgart                51460   3
parport_pc             19076   1  (autoclean)
lp                      9124   0  (autoclean)
parport                37128   1  (autoclean) [parport_pc lp]
autofs                 13076   0  (autoclean) (unused)
3c59x                  29424   1
ipt_REJECT              4248   1  (autoclean)
ipt_state               1048   2  (autoclean)
ip_conntrack           28292   1  (autoclean) [ipt_state]
iptable_filter          2412   1  (autoclean)
ip_tables              15488   3  [ipt_REJECT ipt_state iptable_filter]
floppy                 57692   0  (autoclean)
sg                     36412   0  (autoclean) (unused)
scsi_mod              107456   1  (autoclean) [sg]
microcode               4700   0  (autoclean)
keybdev                 2948   0  (unused)
mousedev                5524   1
hid                    24612   0  (unused)
input                   5728   0  [keybdev mousedev hid]
usb-uhci               26480   0  (unused)
usbcore                78668   1  [hid usb-uhci]
ext3                   70340   2
jbd                    52088   2  [ext3]
[root_at_sed-40 tester]# /sbin/modprobe ni_pcimio
[root_at_sed-40 tester]# /sbin/lsmod
Module                  Size  Used by    Not tainted
ni_pcimio              34336   0  (unused)
mite                    4764   0  [ni_pcimio]
8255                    3776   0  [ni_pcimio]
comedi                 25496   0  [ni_pcimio 8255]
es1371                 29356   1  (autoclean)
ac97_codec             17172   0  (autoclean) [es1371]
gameport                3364   0  (autoclean) [es1371]
soundcore               6468   4  (autoclean) [es1371]
ide-cd                 35648   0  (autoclean)
cdrom                  33280   0  (autoclean) [ide-cd]
mga                   103484   2
agpgart                51460   3
parport_pc             19076   1  (autoclean)
lp                      9124   0  (autoclean)
parport                37128   1  (autoclean) [parport_pc lp]
autofs                 13076   0  (autoclean) (unused)
3c59x                  29424   1
ipt_REJECT              4248   1  (autoclean)
ipt_state               1048   2  (autoclean)
ip_conntrack           28292   1  (autoclean) [ipt_state]
iptable_filter          2412   1  (autoclean)
ip_tables              15488   3  [ipt_REJECT ipt_state iptable_filter]
floppy                 57692   0  (autoclean)
sg                     36412   0  (autoclean) (unused)
scsi_mod              107456   1  (autoclean) [sg]
microcode               4700   0  (autoclean)
keybdev                 2948   0  (unused)
mousedev                5524   1
hid                    24612   0  (unused)
input                   5728   0  [keybdev mousedev hid]
usb-uhci               26480   0  (unused)
usbcore                78668   1  [hid usb-uhci]
ext3                   70340   2
jbd                    52088   2  [ext3]
[root_at_sed-40 tester]# /usr/sbin/comedi_config /dev/comedi0 ni_pcimio
0,11
[root_at_sed-40 tester]# /usr/sbin/comedi_config /dev/comedi1 ni_pcimio
0,10
[root_at_sed-40 tester]# cat /proc/comedi
comedi version 0.7.67.1
format string: "%2d: %-20s %-20s
%4d",i,driver_name,board_name,n_subdevices
 0: ni_pcimio            pci-6733               10
 1: ni_pcimio            pci-6034e              10
ni_pcimio:
 ni_pcimio
8255:
 8255
[root_at_sed-40 tester]# ll /dev/comedi*
crw-rw-rw-    1 root     root      98,   0 Feb 23 16:34 /dev/comedi0
crw-rw-rw-    1 root     root      98,   1 Feb 23 16:34 /dev/comedi1
crw-rw-rw-    1 root     root      98,  10 Feb 23 16:34 /dev/comedi10
crw-rw-rw-    1 root     root      98,  11 Feb 23 16:34 /dev/comedi11
crw-rw-rw-    1 root     root      98,  12 Feb 23 16:34 /dev/comedi12
crw-rw-rw-    1 root     root      98,  13 Feb 23 16:34 /dev/comedi13
crw-rw-rw-    1 root     root      98,  14 Feb 23 16:34 /dev/comedi14
crw-rw-rw-    1 root     root      98,  15 Feb 23 16:34 /dev/comedi15
crw-rw-rw-    1 root     root      98,   2 Feb 23 16:34 /dev/comedi2
crw-rw-rw-    1 root     root      98,   3 Feb 23 16:34 /dev/comedi3
crw-rw-rw-    1 root     root      98,   4 Feb 23 16:34 /dev/comedi4
crw-rw-rw-    1 root     root      98,   5 Feb 23 16:34 /dev/comedi5
crw-rw-rw-    1 root     root      98,   6 Feb 23 16:34 /dev/comedi6
crw-rw-rw-    1 root     root      98,   7 Feb 23 16:34 /dev/comedi7
crw-rw-rw-    1 root     root      98,   8 Feb 23 16:34 /dev/comedi8
crw-rw-rw-    1 root     root      98,   9 Feb 23 16:34 /dev/comedi9
[root_at_sed-40 tester]# cat /proc/pci
PCI devices found:
  Bus  0, device   0, function  0:
    Host bridge: Intel Corp. 440BX/ZX/DX - 82443BX/ZX/DX Host bridge
(rev 3).
      Master Capable.  Latency=64.
      Prefetchable 32 bit memory at 0xe4000000 [0xe7ffffff].
  Bus  0, device   1, function  0:
    PCI bridge: Intel Corp. 440BX/ZX/DX - 82443BX/ZX/DX AGP bridge (rev
3).
      Master Capable.  Latency=64.  Min Gnt=136.
  Bus  0, device   4, function  0:
    ISA bridge: Intel Corp. 82371AB/EB/MB PIIX4 ISA (rev 2).
  Bus  0, device   4, function  1:
    IDE interface: Intel Corp. 82371AB/EB/MB PIIX4 IDE (rev 1).
      Master Capable.  Latency=32.
      I/O at 0xd800 [0xd80f].
  Bus  0, device   4, function  2:
    USB Controller: Intel Corp. 82371AB/EB/MB PIIX4 USB (rev 1).
      IRQ 9.
      Master Capable.  Latency=32.
      I/O at 0xd400 [0xd41f].
  Bus  0, device   4, function  3:
    Bridge: Intel Corp. 82371AB/EB/MB PIIX4 ACPI (rev 2).
      IRQ 9.
  Bus  0, device  10, function  0:
    Class ff00: PCI device 1093:2ca0 (National Instruments) (rev 0).
      IRQ 5.
      Master Capable.  Latency=32.
      Non-prefetchable 32 bit memory at 0xe0000000 [0xe0000fff].
      Non-prefetchable 32 bit memory at 0xdf800000 [0xdf800fff].
  Bus  0, device  11, function  0:
    Class ff00: PCI device 1093:2410 (National Instruments) (rev 0).
      IRQ 10.
      Master Capable.  Latency=32.
      Non-prefetchable 32 bit memory at 0xdf000000 [0xdf000fff].
      Non-prefetchable 32 bit memory at 0xde800000 [0xde800fff].
  Bus  0, device  13, function  0:
    Ethernet controller: 3Com Corporation 3c905B 100BaseTX [Cyclone]
(rev 100).
      IRQ 9.
      Master Capable.  Latency=32.  Min Gnt=10.Max Lat=10.
      I/O at 0xd000 [0xd07f].
      Non-prefetchable 32 bit memory at 0xde000000 [0xde00007f].
  Bus  0, device  14, function  0:
    Multimedia audio controller: Ensoniq ES1371 [AudioPCI-97] (rev 6).
      IRQ 5.
      Master Capable.  Latency=32.  Min Gnt=12.Max Lat=128.
      I/O at 0xb800 [0xb83f].
  Bus  1, device   0, function  0:
    VGA compatible controller: Matrox Graphics, Inc. MGA G400 AGP (rev
4).
      IRQ 11.
      Master Capable.  Latency=64.  Min Gnt=16.Max Lat=32.
      Prefetchable 32 bit memory at 0xe2000000 [0xe3ffffff].
      Non-prefetchable 32 bit memory at 0xe1000000 [0xe1003fff].
      Non-prefetchable 32 bit memory at 0xe0800000 [0xe0ffffff].
[root_at_sed-40 tester]# uname -r
2.4.24

The base installation is Fedora Core 1, and the kernel is stock 2.4.24.


> - -- 
> Frank
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.6 (GNU/Linux)
> Comment: For info see http://www.gnupg.org
> 
> iD8DBQFARSFn5vihyNWuA4URAl9bAJ45v3M+v8JUADeQoTB6QUmown2XLACguCCD
> 5OX7ZWgmYkGAZK9x2psWEjo=
> =2IaM
> -----END PGP SIGNATURE-----
-- 
Daryl Warkentin, P. Eng.
Hardware Engineering
SED Systems
www.sedsystems.ca

Received on 2004-03-03Z15:31:31