Re: mmap problems wih NI PCI-6034E...

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday 26 November 2002 12:58 pm, Pascal Fortin wrote:
>
> I can get a good address from the mmap call only if the "size" argument is
> 1 page less than the buffer size... In other words, the mmap call return a
> good value if I ask for 15 pages (or less) instead of the default 16... Is
> this normal?
>

It's a bug in 0.7.66.  Here is a patch for comedi_fops.c :

diff -u -r1.124 comedi_fops.c
- --- comedi_fops.c       22 Nov 2002 07:12:55 -0000      1.124
+++ comedi_fops.c       26 Nov 2002 20:00:54 -0000
_at__at_ -1258,7 +1258,7 _at__at_
 #endif

        size = vma->vm_end - vma->vm_start;
- -       if(size>=async->prealloc_bufsz)
+       if(size>async->prealloc_bufsz)
                return -EFAULT;
        if(size&(~PAGE_MASK))
                return -EFAULT;

- -- 
Frank

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE949Tb5vihyNWuA4URAs65AJ4jCxMfVOsFhTc+dDhwAs1OV1km2QCfRQTj
dBXhv4WQcCfVl9dtijuHImY=
=EJff
-----END PGP SIGNATURE-----

Received on 2002-11-26Z20:08:56