[PATCH] usb: gadget: f_hid: idle uses the highest byte for duration

Maxim Devaev
2021-07-27T18:58:10Z

SET_IDLE value must be shifted 8 bits to the right to get duration.
This confirmed by USBCV test.

Signed-off-by: Maxim Devaev <mdevaev@gmail.com>
---
drivers/usb/gadget/function/f_hid.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/function/f_hid.c b/drivers/usb/gadget/function/f_hid.c
index 8d50c8b12..bb476e121 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;

--
2.32.0