<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/drivers/hid/usbhid, branch master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/drivers/hid/usbhid?h=master</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/drivers/hid/usbhid?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-08-25T09:44:27Z</updated>
<entry>
<title>HID: move from strlcpy with unused retval to strscpy</title>
<updated>2022-08-25T09:44:27Z</updated>
<author>
<name>Wolfram Sang</name>
<email>wsa+renesas@sang-engineering.com</email>
</author>
<published>2022-08-18T21:00:09Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=eeeec27d68204701cc5d49d79f7ba811e8438109'/>
<id>urn:sha1:eeeec27d68204701cc5d49d79f7ba811e8438109</id>
<content type='text'>
Follow the advice of the below link and prefer 'strscpy' in this
subsystem. Conversion is 1:1 because the return value is not used.
Generated by a coccinelle script.

Link: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/
Signed-off-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>HID: usbhid: remove third argument of usb_maxpacket()</title>
<updated>2022-04-23T08:33:53Z</updated>
<author>
<name>Vincent Mailhol</name>
<email>mailhol.vincent@wanadoo.fr</email>
</author>
<published>2022-03-17T03:55:07Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=b45cde330ba7b52e4c9ea9b36b4a58d32b387441'/>
<id>urn:sha1:b45cde330ba7b52e4c9ea9b36b4a58d32b387441</id>
<content type='text'>
The third argument of usb_maxpacket(): in_out has been deprecated
because it could be derived from the second argument (e.g. using
usb_pipeout(pipe)).

N.B. function usb_maxpacket() was made variadic to accommodate the
transition from the old prototype with three arguments to the new one
with only two arguments (so that no renaming is needed). The variadic
argument is to be removed once all users of usb_maxpacket() get
migrated.

CC: Jiri Kosina &lt;jikos@kernel.org&gt;
CC: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
Signed-off-by: Vincent Mailhol &lt;mailhol.vincent@wanadoo.fr&gt;
Link: https://lore.kernel.org/r/20220317035514.6378-3-mailhol.vincent@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>HID: add suspend/resume helpers</title>
<updated>2021-12-02T14:42:46Z</updated>
<author>
<name>Benjamin Tissoires</name>
<email>benjamin.tissoires@redhat.com</email>
</author>
<published>2021-12-02T09:53:33Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=9e3562080950b6e3fe38a5e34ddd5b1c618f2019'/>
<id>urn:sha1:9e3562080950b6e3fe38a5e34ddd5b1c618f2019</id>
<content type='text'>
There is a lot of duplication of code in the HID low level drivers.
Better have everything in one place so we can eventually extend it
in a generic way.

Signed-off-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Link: https://lore.kernel.org/r/20211202095334.14399-4-benjamin.tissoires@redhat.com
</content>
</entry>
<entry>
<title>Merge branch 'for-5.15/core' into for-linus</title>
<updated>2021-09-01T20:00:06Z</updated>
<author>
<name>Jiri Kosina</name>
<email>jkosina@suse.cz</email>
</author>
<published>2021-09-01T20:00:06Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=dab6e4f452c2fd45c15c701e6f7be665a72c7add'/>
<id>urn:sha1:dab6e4f452c2fd45c15c701e6f7be665a72c7add</id>
<content type='text'>
- Regression fix for an issue in HID core that got uncovered by recent USB core
  cleanup leading to issues when transfer_buffer_length is not in line with wLength
- Memory leak fix in USB HID core
- Improvement of stylus battery reporting
</content>
</entry>
<entry>
<title>HID: usbhid: Simplify code in hid_submit_ctrl()</title>
<updated>2021-09-01T18:52:32Z</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2021-09-01T16:36:06Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=d2f311ec91984adb219ac6985d4dd72c37ae734d'/>
<id>urn:sha1:d2f311ec91984adb219ac6985d4dd72c37ae734d</id>
<content type='text'>
This patch makes a small simplification to the code in
hid_submit_ctrl().  The test for maxpacket being &gt; 0 is unnecessary,
because endpoint 0 always has a maxpacket value which is &gt;= 8.

Furthermore, endpoint 0's maxpacket value is always a power of 2, so
instead of open-coding the round-to-next-multiple computation we can
call the optimized round_up() routine.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Tested-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
Acked-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>HID: usbhid: Fix warning caused by 0-length input reports</title>
<updated>2021-09-01T18:52:31Z</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2021-09-01T16:36:00Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=0a824efdb724e07574bafcd2c2486b2a3de35ff6'/>
<id>urn:sha1:0a824efdb724e07574bafcd2c2486b2a3de35ff6</id>
<content type='text'>
Syzbot found a warning caused by hid_submit_ctrl() submitting a
control request to transfer a 0-length input report:

	usb 1-1: BOGUS control dir, pipe 80000280 doesn't match bRequestType a1

(The warning message is a little difficult to understand.  It means
that the control request claims to be for an IN transfer but this
contradicts the USB spec, which requires 0-length control transfers
always to be in the OUT direction.)

Now, a zero-length report isn't good for anything and there's no
reason for a device to have one, but the fuzzer likes to pick out
these weird edge cases.  In the future, perhaps we will decide to
reject 0-length reports at probe time.  For now, the simplest approach
for avoiding these warnings is to pretend that the report actually has
length 1.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Reported-and-tested-by: syzbot+9b57a46bf1801ce2a2ca@syzkaller.appspotmail.com
Tested-by: Oleksandr Natalenko &lt;oleksandr@natalenko.name&gt;
Tested-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
Acked-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>HID: usbhid: Fix flood of "control queue full" messages</title>
<updated>2021-09-01T18:52:31Z</updated>
<author>
<name>Michal Kubecek</name>
<email>mkubecek@suse.cz</email>
</author>
<published>2021-09-01T16:35:49Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=5049307d37a760e304ad191c5dc7c6851266d2f8'/>
<id>urn:sha1:5049307d37a760e304ad191c5dc7c6851266d2f8</id>
<content type='text'>
[patch description by Alan Stern]

Commit 7652dd2c5cb7 ("USB: core: Check buffer length matches wLength
for control transfers") causes control URB submissions to fail if the
transfer_buffer_length value disagrees with the setup packet's wLength
valuel.  Unfortunately, it turns out that the usbhid can trigger this
failure mode when it submits a control request for an input report: It
pads the transfer buffer size to a multiple of the maxpacket value but
does not increase wLength correspondingly.

These failures have caused problems for people using an APS UPC, in
the form of a flood of log messages resembling:

	hid-generic 0003:051D:0002.0002: control queue full

This patch fixes the problem by setting the wLength value equal to the
padded transfer_buffer_length value in hid_submit_ctrl().  As a nice
bonus, the code which stores the transfer_buffer_length value is now
shared between the two branches of an "if" statement, so it can be
de-duplicated.

Signed-off-by: Michal Kubecek &lt;mkubecek@suse.cz&gt;
Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Fixes: 7652dd2c5cb7 ("USB: core: Check buffer length matches wLength for control transfers")
Tested-by: Oleksandr Natalenko &lt;oleksandr@natalenko.name&gt;
Tested-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
Acked-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>HID: Kconfig: Fix spelling mistake "Uninterruptable" -&gt; "Uninterruptible"</title>
<updated>2021-07-28T09:41:57Z</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2021-07-19T10:27:31Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=0818ec1f508fc3b8e957f6c7f77b988c5bc24da7'/>
<id>urn:sha1:0818ec1f508fc3b8e957f6c7f77b988c5bc24da7</id>
<content type='text'>
There is a spelling mistake in the Kconfig text. Fix it.

Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>HID: usbhid: free raw_report buffers in usbhid_stop</title>
<updated>2021-07-28T09:31:40Z</updated>
<author>
<name>Anirudh Rayabharam</name>
<email>mail@anirudhrb.com</email>
</author>
<published>2021-06-23T18:40:29Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=f7744fa16b96da57187dc8e5634152d3b63d72de'/>
<id>urn:sha1:f7744fa16b96da57187dc8e5634152d3b63d72de</id>
<content type='text'>
Free the unsent raw_report buffers when the device is removed.

Fixes a memory leak reported by syzbot at:
https://syzkaller.appspot.com/bug?id=7b4fa7cb1a7c2d3342a2a8a6c53371c8c418ab47

Reported-by: syzbot+47b26cd837ececfc666d@syzkaller.appspotmail.com
Tested-by: syzbot+47b26cd837ececfc666d@syzkaller.appspotmail.com
Signed-off-by: Anirudh Rayabharam &lt;mail@anirudhrb.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-5.14/multitouch' into for-linus</title>
<updated>2021-06-30T07:15:15Z</updated>
<author>
<name>Jiri Kosina</name>
<email>jkosina@suse.cz</email>
</author>
<published>2021-06-30T07:15:15Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=b3e29642548258c7cd2cb3326a776fff84cd6b69'/>
<id>urn:sha1:b3e29642548258c7cd2cb3326a776fff84cd6b69</id>
<content type='text'>
- patch series that ensures that hid-multitouch driver disables touch and
  button-press reporting on hid-mt devices during suspend when the device is
  not configured as a wakeup-source, from Hans de Goede
</content>
</entry>
</feed>
