lkml.org 
[lkml]   [2003]   [Nov]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectproposed fix to usb-core
We are currently fighting with a problem with the USB HID API, which
seems to prevent a user space application to write more than 32 bit
into a HID field.

We think that this problem can be solved with one of two little
changes to /drivers/usb/hid-core.c (2.4.22 tree):

Function hid_register_field at usb-core.c:96:
static struct hid_field *hid_register_field(struct hid_report *report, unsigned usages, unsigned values)

The function either needs to duplicate the struct hid_usage or grow
the size of the last struct hid_usage. The first option is the
easiest since it does not require a change of hiddev API. The later
option is probably more effective but requires to change the
HIDIOCSUSAGE ioctl so that it accepts a struct {void* data, int
data_size} instead of just int data.

I would be happy to submit a patch, but would like to hear first
which option is favourable. The first costs performance and memory,
the second an API change.

Or is there a specific reason why only 32 bits are writeable?

Thanks,

--
Martin F. Krafft Artificial Intelligence Laboratory
Ph.D. Student Department of Information Technology
Email: krafft@ailab.ch University of Zurich
Tel: +41.(0)1.63-54323 Andreasstrasse 15, Office 2.20
http://ailab.ch/people/krafft CH-8050 Zurich, Switzerland

Invalid/expired PGP subkeys? Use subkeys.pgp.net as keyserver!

"if a man treats life artistically, his brain is his heart."
-- oscar wilde
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 13:58    [W:0.377 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site