Tests with SuSE 7.1

Dear comediers,

I am trying to control some physicals events with Linux.
I have a National Inst. PCI-6023E card and I have tryed to work with
the edaq driver but it doesn't work with multichannel acquisition.
So, I have found your Comedi tool and I am very interresting to work
with it and to help you in your task if you want.

So, I have installed the tool on a Intel machine with SuSE 7.1 (kernel 
2.2.18)

When I run 'make' to compile the kernel modules, it appends that :
cc -I /home/ser/pcma/comedi-0.7.65/include -D__KERNEL__ 
-I/usr/src/linux-2.2.18.SuSE/include -Wall -Wstrict-prototypes -O2 
-fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce 
-m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -DCPU=586 
-DMODULE  -nostdinc -I /usr/lib/gcc-lib/i486-suse-linux/2.95.2/include 
-DMODULE   -c -o comedi_fops.o comedi_fops.c
comedi_fops.c: In function `comedi_event':
comedi_fops.c:1842: too few arguments to function `kill_fasync'
comedi_fops.c:1846: too few arguments to function `kill_fasync'
make[1]: *** [comedi_fops.o] Error 1
make[1]: Leaving directory `/home/ser/pcma/comedi-0.7.65/comedi'
make: *** [_mod_comedi] Error 2

So, I have read the c file and I saw that you have write
in the comedi-0.7.65/include/linux/fs.h :

         #if LINUX_VERSION_CODE < 0x020200
         /* no fasync */
         #define KILL_FASYNC(a,b,c)
         #else
         #if LINUX_VERSION_CODE < 0x020400
         #define KILL_FASYNC(a,b,c)    kill_fasync((a),(c))
         #else
         #define KILL_FASYNC(a,b,c)    kill_fasync(&(a),(b),(c))
         #endif
         #endif

and I have compare with the content of /usr/include/linux/fs.h :
In fact SuSE has modified the function kill_fasync and has gave it the 
same signature as in kernel 2.4.x.
So, I have modified your comedi-0.7.65/include/linux/fs.h to force :
         #define KILL_FASYNC(a,b,c)    kill_fasync(&(a),(b),(c))

After installation, all work fine !
I have run info, dio and cmd with success but some time I get a message 
on console :

         kernel: kill_fasyn: bad magic number in fasync_struct!

So I have read the /usr/include/linux/fs.h and I saw :

struct fasync_struct {
     int    magic;
     int    fa_fd;
     struct fasync_struct    *fa_next; /* singly linked list */
     struct file         *fa_file;
};

#define FASYNC_MAGIC 0x4601

So, I think that perhaps we have to initialize magic with FASYNC_MAGIC ?

What do you think about that ?

Best regards.

Patrick

-- 
Informatique S.E.R.I.A.N.E.             http://www.seriane.fr/
79-81 avenue Daničle CASANOVA
B.P. 136                                tel : 01 49 59 05 55
94208 IVRY sur Seine Cedex              fax : 01 49 60 84 57

Received on 2002-10-30Z14:52:34