mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* proposed fix to usb-core
@ 2003-11-14 10:29 Martin F Krafft
  2003-11-14 12:56 ` Loic Dachary
  0 siblings, 1 reply; 2+ messages in thread
From: Martin F Krafft @ 2003-11-14 10:29 UTC (permalink / raw)
  To: linux kernel mailing list; +Cc: phidgets

[-- Attachment #1: Type: text/plain, Size: 1571 bytes --]

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

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: proposed fix to usb-core
  2003-11-14 10:29 proposed fix to usb-core Martin F Krafft
@ 2003-11-14 12:56 ` Loic Dachary
  0 siblings, 0 replies; 2+ messages in thread
From: Loic Dachary @ 2003-11-14 12:56 UTC (permalink / raw)
  To: Martin F Krafft; +Cc: linux kernel mailing list, phidgets


	Hi,

	For information this problem is already know to Vojtech Pavlik
<vojtech@suse.cz> and was reported last month on linux-usb-devl
(http://marc.theaimsgroup.com/?l=linux-usb-devel&m=106708259416772&w=2).

	Cheers,

-- 
Donate to FSF France online : http://rate.affero.net/fsffrance/
Loic Dachary, 12 bd Magenta, 75010 Paris. Tel: 33 1 42 45 07 97      
http://www.fsffrance.org/   http://www.dachary.org/loic/gpg.txt

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-11-14 13:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-14 10:29 proposed fix to usb-core Martin F Krafft
2003-11-14 12:56 ` Loic Dachary

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®