Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

NI488 V2.3 driver on Suse Linux 9.3 Kernel 2.6.11.4

Hi everybody,
for long time I worked with Kernel 2.4 and NI488 v0.89 with no problems.
For some reason (out of this scope) I had to switch to Suse 9.3, Kernel 2.6.11.4 and therefor NI488 V2.3
for my PCI GPIB.
The driver could not be compiled and installed!
The solution is simple: Function usb_epnum_to_ep_desc in /usr/src/linux/drivers/usb/core/usb.c
does no more exist. I solved this problem by editing ../natinst/nikal/src/nikal.c at two positions:

---
// cfsw 20050530 replace next line with following line
//endpointDesc = usb_epnum_to_ep_desc(usbDevice, kalURB->endpoint);
endpointDesc = usbDevice->ep_in[kalURB->endpoint];
---

now the driver compiles without errors and works fine.
My main problem was to get through the installation scripts AND include this correction, which
results in quite a lot of shell commands.
As far as I know any kernel with version number > 2.6.8 will lead to this problem.

I hope this hint will help others to save time and encourage more users to work with
Linux and NI GPIB, which is an excellent solution.

have fun
cfsw
Message 1 of 2
(3,673 Views)
further issues with Kernel 2.6.11

1) I saw this posted elsewhere, in nikal.c line 196:
*******
// 20050728 cfm I moved the definitions for the following inlined functions here
// now the file compiles ...
static inline nNIKAL100_tBoolean nNIKAL100_isKernelContiguousPointer(const void *ptr)
{
   return ((nNIKAL100_tUPtr)ptr < (unsigned)VMALLOC_START);
}

static inline nNIKAL100_tBoolean nNIKAL100_isKernelVirtualPointer(const void *ptr)
{
   return ((((nNIKAL100_tUPtr)ptr >= (unsigned)VMALLOC_START) &&
      ((nNIKAL100_tUPtr)ptr < (unsigned)VMALLOC_END)));
}

*******
2) the function / symbol remap_page_range was not found.
The command:
>>grep remap_page_range /usr/src/kernels/2.6.11-1.1369_FC4-i686/include/*/*
/usr/src/kernels/2.6.11-1.1369_FC4-i686/include/asm/pgtable.h:#define io_remap_page_range(vma, vaddr, paddr, size, prot)      
A look at pgtable.h finds:
*******
#define io_remap_page_range(vma, vaddr, paddr, size, prot)        \
        remap_pfn_range(vma, vaddr, (paddr) >> PAGE_SHIFT, size, prot)

#define io_remap_pfn_range(vma, vaddr, pfn, size, prot)        \
        remap_pfn_range(vma, vaddr, pfn, size, prot)
*****
# grep "define PAGE_SHIFT" /usr/src/kernels/2.6.11-1.1369_FC4-i686/include/*/*
/usr/src/kernels/2.6.11-1.1369_FC4-i686/include/asm/page.h:#define PAGE_SHIFT   12
*****
included....
on line 1245 of nikal.c change the following:
*********
   status =
//#ifdef nNIKAL100_kFiveParameterRemapPageRange
   remap_pfn_range(vma,vma->vm_start, physAddr,
                    (vma->vm_end - vma->vm_start)>>12,
                    vma->vm_page_prot);
//   remap_page_range(vma, vma->vm_start, physAddr,
//                    (vma->vm_end - vma->vm_start),
//                    vma->vm_page_prot);
//#else
   remap_page_range(vma->vm_start, physAddr,
                    (vma->vm_end - vma->vm_start),
                    vma->vm_page_prot);
//#endif
*****************
and still I have not got it all because the test utility gpibtsw gives me:
____
The NI-488.2 Software is not correctly installed on your system.  Please follow these steps:

1. Restart your system.
2. Reinstall the NI488.2 Software.
3.  Run the Troubleshooting Wizard again.
[OK]
____

This is what the system log tells me about the boot up process and these drivers.....
I dont know what more to do with it...... any help out there?

****
Jul 30 13:12:40 desk kernel: nikal: module license 'Copyright (c).....' taints kernel.
Jul 30 13:12:40 desk nipalsm: [libnipalu.so.1.9]  Warning: source/lib/linux/linLoadKern.cpp:168 - libKernelDriverLoad: Failed to open nipalk, errno: 2
Jul 30 13:12:40 desk nipalsm: [libnipalu.so.1.9]  Warning: source/initcln/initcln.cpp:147 - Posix: Init kInitClnPackage: kernelDriver: failed! status=-50204
Jul 30 13:12:40 desk nipalsm: [libnipalu.so.1.9]  Warning: source/package/posix/ulibEntry.cpp:192 - initialize: unable to load NI-PAL. status=-50204
Jul 30 13:12:40 desk kernel: nipalk: no version for "nNIKAL100_getTimeOfDayInterval" found: kernel tainted.
*****
I've checked the function "nNIKAL100_getTimeOfDayInterval" and it is present in nikal.c and exported...????
any one got a clue.... I sure need one I think it may have something to do with the NI-VISA but not sure.....
.chuck

0 Kudos
Message 2 of 2
(3,575 Views)