RE: Measurement Computing PCIM-1602/16

OK, I have taken the skel.c driver, and used chunks of the cb_pcidas code for attach and detach since the PCI interface is not dissimilar.

It appears to initialise the driver correctly, at least the io memory regions it allocates
are the same as /proc/pci reports are available.

However, when I call "comedi_config -r /dev/comedi1", the devpriv structure that should hold the addresses is full of zeros, but the device number is correct at 1. The detach routine then doesn't free the memory, and I have to reboot to try again.

Any ideas?

Richard


Transcript (with some extra debug output) below:
------------------------------------------
[root_at_cook comedi]# cat /proc/pci
PCI devices found:
<snip>
  Bus  0, device  19, function  0:
    Class ffff: PCI device 1307:0056 (Computer Boards) (rev 2).
      IRQ 11.
      Non-prefetchable 32 bit memory at 0xf0000000 [0xf000007f].
      I/O at 0x6000 [0x607f].
      I/O at 0x6100 [0x6107].
      I/O at 0x6200 [0x620f].
      I/O at 0x6300 [0x6303].

[root_at_cook comedi]# modprobe cb_pcimdas

[root_at_cook comedi]# tail /var/log/messages
Nov 11 15:00:52 cook kernel: comedi: version 0.7.65-cvs - David Schleef <ds_at_schleef.org>

[root_at_cook comedi]# comedi_config /dev/comedi1 cb_pcimdas

[root_at_cook comedi]# tail /var/log/messages
Nov 11 15:01:30 cook modprobe: modprobe: Can't locate module char-major-98-1
Nov 11 15:01:30 cook kernel: comedi1: cb_pcimdas:
Nov 11 15:01:30 cook kernel: Found PCIM-DAS1602/16 on bus 0, slot 19
Nov 11 15:01:30 cook kernel: devpriv->pci_mem_config = 0
Nov 11 15:01:30 cook kernel: devpriv->pci_io_config = 24576
Nov 11 15:01:30 cook kernel: devpriv->adc_dac_fifo = 24832
Nov 11 15:01:30 cook kernel: devpriv->pacer_counter_dio = 25088
Nov 11 15:01:30 cook kernel: devpriv->dio_registers = 25344
Nov 11 15:01:30 cook kernel: attached

[root_at_cook comedi]# comedi_config -r /dev/comedi1

[root_at_cook comedi]# tail /var/log/messages
Nov 11 15:02:09 cook kernel: devpriv->pci_mem_config = 0
Nov 11 15:02:09 cook kernel: devpriv->pci_io_config = 0
Nov 11 15:02:09 cook kernel: devpriv->adc_dac_fifo = 0
Nov 11 15:02:09 cook kernel: devpriv->pacer_counter_dio = 0
Nov 11 15:02:09 cook kernel: devpriv->dio_registers = 0
Nov 11 15:02:09 cook kernel: comedi1: cb_pcimdas: remove

[root_at_cook comedi]#
------------------------------------------

Received on 2002-11-11Z15:05:54