Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for pcim-das16jr #44

Open
kejava opened this issue Apr 1, 2022 · 2 comments
Open

Support for pcim-das16jr #44

kejava opened this issue Apr 1, 2022 · 2 comments

Comments

@kejava
Copy link

kejava commented Apr 1, 2022

Hi,
I have a large set of MCC PCI boards (7) that I'm trying to use under Linux (I don't any MS Windows with PCI slots). I'm mostly trying to confirm functionality before moving on to the next step of development. I can test most of the boards with the Comedi kernel modules and xoscope, with the exception of one, the "PCIM-DAS16JR/16". For some reason, it's never been supported under Comedi. So did some searching and found your work via the MCC site.

So I downloaded the source, went to the pcim-das16jr directory, and ran 'make'. I'm running kernel 5.4.0-105 so got the error "Your kernel is too new for the current driver". I saw that other people had contributed patches for other devices for this same issue.

I'm new to this. Can you give me some suggestions on what changes I can make to get this to build properly?

Also, if you need help testing updates for other hardware, I have several PCI boards. Here's my list:
PCI-DAS08, PCI-DAS6071, PCI-DAS6402/16, PCI-DIO96H, PCIM-DAS1602/16, PCIM-DAS16JR/16, PCIM-DDA06/16

Sorry if this gets asked a lot ... have you considered combining efforts with the Comedi project?

-KevinV

@wjasper
Copy link
Owner

wjasper commented Apr 30, 2022

cp a2dc_4_10_0.c a2dc_5_0.c

In the file a2dc.c add the lines
#if LINUX_VERSION_CODE >= VERSION_CODE(5,0,0) && LINUX_VERSION_CODE < VERSION_CODE(5,99,0)
#include "a2dc_5_0.c"
#endif
and
#if LINUX_VERSION_CODE >= VERSION_CODE(5,99,0)
#error "Your kernel is too new for the current driver. It may work but is untested."
#endif

that will at least get it to compile. You will then need to resolve the errors.
like remove the first argument in

access_ok((void *) arg, size)

@kejava
Copy link
Author

kejava commented May 16, 2022

Hi Warren,

Sorry for the lag. I had the hardware removed. I made the changes you suggested and was able to compile.
To test the kernel module, I ran "sudo insmod pcim_das16jr.ko" but the command line locked up. So I looked at the dmesg output in a different terminal. You can see the kernel oops here.
I also looked in /dev/das16jr/ and it looked like all 16 ai channels were created.
I'm running this through a PCIexpress to PCI expansion chassis right now. That could be adding to the problem so I'll try running with a direct pci plugin next.

[UPDATE]
Tried with the board directly plugged (no pci expansion chassis) and got the same results.

-KevinV

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants