mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Martin F Krafft <krafft@ailab.ch>
To: linux kernel mailing list <linux-kernel@vger.kernel.org>
Cc: phidgets@lists.ailab.ch
Subject: proposed fix to usb-core
Date: Fri, 14 Nov 2003 11:29:06 +0100	[thread overview]
Message-ID: <20031114102906.GA25345@piper.madduck.net> (raw)

[-- 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 --]

             reply	other threads:[~2003-11-14 10:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-14 10:29 Martin F Krafft [this message]
2003-11-14 12:56 ` Loic Dachary

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20031114102906.GA25345@piper.madduck.net \
    --to=krafft@ailab.ch \
    --cc=linux-kernel@vger.kernel.org \
    --cc=phidgets@lists.ailab.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®