diff options
author | Maxim Devaev <[email protected]> | 2021-07-27 21:58:00 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2021-07-28 08:24:39 +0200 |
commit | fa20bada3f934e3b3e4af4c77e5b518cd5a282e5 (patch) | |
tree | e519759e17ce182fd5ecd93ef5cc10c5869135b9 | |
parent | 8e3341257e3b5774ec8cd3ef1ba0c0d3fada322b (diff) |
usb: gadget: f_hid: idle uses the highest byte for duration
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 <[email protected]>
Signed-off-by: Maxim Devaev <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r-- | drivers/usb/gadget/function/f_hid.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/function/f_hid.c b/drivers/usb/gadget/function/f_hid.c index 8d50c8b127fd..bb476e121eae 100644 --- a/drivers/usb/gadget/function/f_hid.c +++ b/drivers/usb/gadget/function/f_hid.c @@ -573,7 +573,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; |