projects
/
wrapfs-3.2.y.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
02f336c
)
usb: gadget: f_hid: idle uses the highest byte for duration
author
Maxim Devaev
<mdevaev@gmail.com>
Tue, 27 Jul 2021 18:58:00 +0000
(21:58 +0300)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Thu, 12 Aug 2021 11:21:00 +0000
(13:21 +0200)
commit
fa20bada3f934e3b3e4af4c77e5b518cd5a282e5
upstream.
SET_IDLE value must be shifted 8 bits to the right to get duration.
This confirmed by USBCV test.
Fixes: afcff6dc690e ("usb: gadget: f_hid: added GET_IDLE and SET_IDLE handlers")
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Maxim Devaev <mdevaev@gmail.com>
Link:
https://lore.kernel.org/r/20210727185800.43796-1-mdevaev@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/function/f_hid.c
patch
|
blob
|
history
diff --git
a/drivers/usb/gadget/function/f_hid.c
b/drivers/usb/gadget/function/f_hid.c
index 9076099becc0ac2e3f6d9c876288915d78bb44c6..e4d71410a4b1cde68e7a356a0c0f60a840d756b7 100644
(file)
--- a/
drivers/usb/gadget/function/f_hid.c
+++ b/
drivers/usb/gadget/function/f_hid.c
@@
-579,7
+579,7
@@
static int hidg_setup(struct usb_function *f,
| HID_REQ_SET_IDLE):
VDBG(cdev, "set_idle\n");
length = 0;
- hidg->idle = value;
+ hidg->idle = value
>> 8
;
goto respond;
break;