Thread (7 messages) flat view 7 messages, 3 authors, 2021-07-28
STALE1863d LANDED

Landed in mainline as fa20bada3f93 on 2021-07-28.

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

From: Maxim Devaev <hidden>
Date: 2021-07-27 18:58:11
Also in: lkml
Subsystem: the rest, usb subsystem · Maintainers: Linus Torvalds, Greg Kroah-Hartman

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

Signed-off-by: Maxim Devaev <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help