Re: JR3 force sensor driver

Hello Anders,

On 29/06/07 18:19, you wrote:
> Frank Mori Hess wrote:
>> On Friday 15 June 2007 12:54, Anders Blomdell wrote:
>>> Still work to do, but this version seems to be fully working
>> Hi Anders,
>>
>> Thanks for the driver.  The binary firmware shouldn't be compiled into the 
>> driver though.  The firmware should go in a subdirectory of the 
>> comedi_nonfree_firmware tarball (we can probably add a directory for it to 
>> cvs if that would help) and be loaded to the driver from userspace.  You 
>> can either use the support for loading firmware in comedi_config, or 
>> figure out how to use the kernel's generic firmware loading support (no 
>> drivers do this yet).
> OK,
> 
> Updated patch with support for firmware upload (place jr3pci.idm in
> /lib/firmware/comedi).

I noticed your driver accesses I/O memory without using the proper
access functions.  Also I don't think your get_s16, get_u16, set_s16 and
set_u16 functions will work on bigendian machines because, for example,
the 'as_u16' member of the 'u_val_t' union type would overlay the
most-significant half of the 'as_u32' member on bigendian machines
instead of the least-significant half.

Could you try the attached patch against the current CVS?  Note that the
'readl' and 'writel' calls will take care of the endian conversions
required for bigendian machines.

-- 
-=( Ian Abbott _at_ MEV Ltd.    E-mail: <abbotti_at_mev.co.uk>        )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587         )=-

Received on 2007-07-05Z11:10:14