<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/include/linux/hid.h, branch v2.6.26-rc2</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>usbhid endianness annotations and fixes</title>
<updated>2008-04-28T17:03:31+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@ftp.linux.org.uk</email>
</author>
<published>2008-04-28T06:00:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=01d7b369887b6feb7c9ce2b20988fafe3f70841c'/>
<id>01d7b369887b6feb7c9ce2b20988fafe3f70841c</id>
<content type='text'>
usb_control_msg() converts arguments to little-endian itself,
doing that in caller means breakage on big-endian boxen.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
usb_control_msg() converts arguments to little-endian itself,
doing that in caller means breakage on big-endian boxen.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: fix race between open() and disconnect() in usbhid</title>
<updated>2008-04-22T09:34:58+00:00</updated>
<author>
<name>Oliver Neukum</name>
<email>oliver@neukum.org</email>
</author>
<published>2008-03-31T14:27:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=69626f23bce6521367ac1e6a2a6e8fba8f0a848a'/>
<id>69626f23bce6521367ac1e6a2a6e8fba8f0a848a</id>
<content type='text'>
There is a window:

task A					task B
spin_lock_irq(&amp;usbhid-&gt;inlock);	/* Sync with error handler */
usb_set_intfdata(intf, NULL);
spin_unlock_irq(&amp;usbhid-&gt;inlock);
usb_kill_urb(usbhid-&gt;urbin);
usb_kill_urb(usbhid-&gt;urbout);
usb_kill_urb(usbhid-&gt;urbctrl);

del_timer_sync(&amp;usbhid-&gt;io_retry);
cancel_work_sync(&amp;usbhid-&gt;reset_work);

						if (!hid-&gt;open++) {
							res = usb_autopm_get_interface(usbhid-&gt;intf);
							if (res &lt; 0) {
								hid-&gt;open--;
								return -EIO;
							}
						}
						if (hid_start_in(hid))

if (hid-&gt;claimed &amp; HID_CLAIMED_INPUT)
	hidinput_disconnect(hid);

in which an open() to an already disconnected device will submit an URB
to an undead device. In case disconnect() was called by an ioctl, this'll
oops. Fix by introducing a new flag and checking it in hid_start_in().

Signed-off-by: Oliver Neukum &lt;oneukum@suse.de&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There is a window:

task A					task B
spin_lock_irq(&amp;usbhid-&gt;inlock);	/* Sync with error handler */
usb_set_intfdata(intf, NULL);
spin_unlock_irq(&amp;usbhid-&gt;inlock);
usb_kill_urb(usbhid-&gt;urbin);
usb_kill_urb(usbhid-&gt;urbout);
usb_kill_urb(usbhid-&gt;urbctrl);

del_timer_sync(&amp;usbhid-&gt;io_retry);
cancel_work_sync(&amp;usbhid-&gt;reset_work);

						if (!hid-&gt;open++) {
							res = usb_autopm_get_interface(usbhid-&gt;intf);
							if (res &lt; 0) {
								hid-&gt;open--;
								return -EIO;
							}
						}
						if (hid_start_in(hid))

if (hid-&gt;claimed &amp; HID_CLAIMED_INPUT)
	hidinput_disconnect(hid);

in which an open() to an already disconnected device will submit an URB
to an undead device. In case disconnect() was called by an ioctl, this'll
oops. Fix by introducing a new flag and checking it in hid_start_in().

Signed-off-by: Oliver Neukum &lt;oneukum@suse.de&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: make hid_input_field and usbhid_modify_dquirk static</title>
<updated>2008-04-22T09:34:58+00:00</updated>
<author>
<name>Adrian Bunk</name>
<email>bunk@kernel.org</email>
</author>
<published>2008-03-30T23:53:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=abdff0f7749a6696ba2a4238b675cbc55abcdb7a'/>
<id>abdff0f7749a6696ba2a4238b675cbc55abcdb7a</id>
<content type='text'>
This patch makes the following needlessly global functions static:
- hid-core.c:hid_input_field()
- usbhid/hid-quirks.c:usbhid_modify_dquirk()

Signed-off-by: Adrian Bunk &lt;bunk@kernel.org&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch makes the following needlessly global functions static:
- hid-core.c:hid_input_field()
- usbhid/hid-quirks.c:usbhid_modify_dquirk()

Signed-off-by: Adrian Bunk &lt;bunk@kernel.org&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: force feedback driver for Logitech Rumblepad 2</title>
<updated>2008-04-22T09:34:57+00:00</updated>
<author>
<name>Anssi Hannula</name>
<email>anssi.hannula@gmail.com</email>
</author>
<published>2008-03-31T23:51:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=c17f9c901c4e62cbf857b831bcc3070380449b88'/>
<id>c17f9c901c4e62cbf857b831bcc3070380449b88</id>
<content type='text'>
Add force feedback support for Logitech Rumblepad 2.

Tested-By: Edgar Simo &lt;bobbens@gmail.com&gt;
Signed-off-by: Anssi Hannula &lt;anssi.hannula@gmail.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add force feedback support for Logitech Rumblepad 2.

Tested-By: Edgar Simo &lt;bobbens@gmail.com&gt;
Signed-off-by: Anssi Hannula &lt;anssi.hannula@gmail.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: move wait from hid to usbhid</title>
<updated>2008-04-22T09:34:57+00:00</updated>
<author>
<name>Jiri Slaby</name>
<email>jirislaby@gmail.com</email>
</author>
<published>2008-03-19T20:55:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=1d1bdd20008416a744c0c844e231e7ba69c11699'/>
<id>1d1bdd20008416a744c0c844e231e7ba69c11699</id>
<content type='text'>
Since only place where this is used is usbhid, move it there.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since only place where this is used is usbhid, move it there.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: make function from dbg_hid</title>
<updated>2008-04-22T09:34:57+00:00</updated>
<author>
<name>Jiri Slaby</name>
<email>jirislaby@gmail.com</email>
</author>
<published>2008-03-09T15:29:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=1b184cf37f5cf098f07725b483a2055e95725476'/>
<id>1b184cf37f5cf098f07725b483a2055e95725476</id>
<content type='text'>
To check paramters even if debug is disabled, convert dbg_hid
to inline function with __attribute__(format) checking.

Signed-off-by: Jiri Slaby &lt;jirislaby@gmail.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To check paramters even if debug is disabled, convert dbg_hid
to inline function with __attribute__(format) checking.

Signed-off-by: Jiri Slaby &lt;jirislaby@gmail.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: Sunplus Wireless Desktop needs report descriptor fixup</title>
<updated>2008-04-22T09:34:57+00:00</updated>
<author>
<name>Jiri Kosina</name>
<email>jkosina@suse.cz</email>
</author>
<published>2008-03-14T15:53:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=5f1ab74f650b392ebcaa7cf3283e56d8dc6c7e56'/>
<id>5f1ab74f650b392ebcaa7cf3283e56d8dc6c7e56</id>
<content type='text'>
This device has reports lower logical maximum compared to the real
usages for Zoom+ and Zoom- it emits.

This patch bumps the values in the report descriptor up, and also
adjusts HID_MAX_USAGE accordingly.

Reported-by: Khelben Blackstaff &lt;eye.of.the.8eholder@gmail.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This device has reports lower logical maximum compared to the real
usages for Zoom+ and Zoom- it emits.

This patch bumps the values in the report descriptor up, and also
adjusts HID_MAX_USAGE accordingly.

Reported-by: Khelben Blackstaff &lt;eye.of.the.8eholder@gmail.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: quirk for MS Wireless Desktop Receiver (model 1028)</title>
<updated>2008-04-22T09:34:57+00:00</updated>
<author>
<name>Jim Duchek</name>
<email>jim.duchek@gmail.com</email>
</author>
<published>2008-03-14T14:53:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=974faac46455076c709a745f546b348017ad18dc'/>
<id>974faac46455076c709a745f546b348017ad18dc</id>
<content type='text'>
Microsoft's wireless desktop receiver (Model 1028) has a bug in the report
descriptor -- namely, in four seperate places it uses USAGE_MIN and _MAX when
it quite obviously doesn't intend to.

In other words, it reports that it has pretty much _everything_ in 'consumer'
and 'generic desktop'.  And then the X evdev driver believes I have a mouse
with 36 absolute axes and a huge pile of keys and buttons, when I in fact,
should have zero.  255/256 in three of the cases, and 0-1024 in another.

This patch fixes the report descriptor of this device before it enters the HID
parser.

Signed-off-by: Jim Duchek &lt;jim.duchek@gmail.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Microsoft's wireless desktop receiver (Model 1028) has a bug in the report
descriptor -- namely, in four seperate places it uses USAGE_MIN and _MAX when
it quite obviously doesn't intend to.

In other words, it reports that it has pretty much _everything_ in 'consumer'
and 'generic desktop'.  And then the X evdev driver believes I have a mouse
with 36 absolute axes and a huge pile of keys and buttons, when I in fact,
should have zero.  255/256 in three of the cases, and 0-1024 in another.

This patch fixes the report descriptor of this device before it enters the HID
parser.

Signed-off-by: Jim Duchek &lt;jim.duchek@gmail.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: fixup fullspeed interval on highspeed Afatech DVB-T IR kbd</title>
<updated>2008-04-22T09:34:56+00:00</updated>
<author>
<name>Pekka Sarnila</name>
<email>sarnila@adit.fi</email>
</author>
<published>2008-03-06T12:23:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=f345c37c37641beceb0e52f61bb4cbc72904ee09'/>
<id>f345c37c37641beceb0e52f61bb4cbc72904ee09</id>
<content type='text'>
Many vendors highspeed devices give erroneously fullspeed interval value in
endpoint descriptor for interrupt endpoints. This quirk fixes up that by
recalculating the right value for highspeed device.

At the time of hid configuration this quirk calculates which highspeed interval
value gives same interval delay as, or next smaller then, what it would be if
the original value would be interpreted as fullspeed value. In subsequent urbs
that new value is used instead.

Forming the 'hid-&gt;name' in usb_hid_config() was moved up to accommodate more
descriptive printk reporting the fixup.

In this patch the quirk is set for one such device: Afatech DVB-T 2 infrared
HID-keyboard. It reports value 16 which means 4,069s in highspeed while
obviously 16ms was intended. In this case quirk calculates new value to be 8
which gives when interpreted as highspeed value 16ms as wanted. The behavior of
the device was verified to be what expected both before and after the patch.

Signed-off-by: Pekka Sarnila &lt;sarnila@adit.fi&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Many vendors highspeed devices give erroneously fullspeed interval value in
endpoint descriptor for interrupt endpoints. This quirk fixes up that by
recalculating the right value for highspeed device.

At the time of hid configuration this quirk calculates which highspeed interval
value gives same interval delay as, or next smaller then, what it would be if
the original value would be interpreted as fullspeed value. In subsequent urbs
that new value is used instead.

Forming the 'hid-&gt;name' in usb_hid_config() was moved up to accommodate more
descriptive printk reporting the fixup.

In this patch the quirk is set for one such device: Afatech DVB-T 2 infrared
HID-keyboard. It reports value 16 which means 4,069s in highspeed while
obviously 16ms was intended. In this case quirk calculates new value to be 8
which gives when interpreted as highspeed value 16ms as wanted. The behavior of
the device was verified to be what expected both before and after the patch.

Signed-off-by: Pekka Sarnila &lt;sarnila@adit.fi&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: fix processing of event quirks</title>
<updated>2008-02-11T12:01:51+00:00</updated>
<author>
<name>Jiri Kosina</name>
<email>jkosina@suse.cz</email>
</author>
<published>2008-02-07T15:48:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=68a1f2cc8676f22a6fd49f344f99e326eb7f5117'/>
<id>68a1f2cc8676f22a6fd49f344f99e326eb7f5117</id>
<content type='text'>
The old code (before move) stopped further processing of the
event after it has been already processed by the quirk handler.

The new code didn't propagate the return value properly, and
therefore the processing always proceeded, which was wrong.

This patch fixes it. Pointed out in kernel.org bugzilla #9842

Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The old code (before move) stopped further processing of the
event after it has been already processed by the quirk handler.

The new code didn't propagate the return value properly, and
therefore the processing always proceeded, which was wrong.

This patch fixes it. Pointed out in kernel.org bugzilla #9842

Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
</feed>
