Skip to contentSkip to conversation

patch "usb: gadget: f_hid: idle uses the highest byte for duration" added to usb-linus

PATCH [email protected] 1 participant 1 message Jul 28, 2021

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

usb: gadget: f_hid: idle uses the highest byte for duration

to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-linus branch.

The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)

The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.

If you have any questions about this process, please let me know.

From fa20bada3f934e3b3e4af4c77e5b518cd5a282e5 Mon Sep 17 00:00:00 2001
From: Maxim Devaev <[email protected]>
Date: Tue, 27 Jul 2021 21:58:00 +0300
Subject: 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]>
---
 drivers/usb/gadget/function/f_hid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/gadget/function/f_hid.c +1 -1
index 8d50c8b127fd..bb476e121eae 100644
@@ -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;
 
Signature · 1 line
2.32.0