lkml.org 
[lkml]   [2021]   [Jul]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] usb: gadget: f_hid: idle uses the highest byte for duration
On Tue, Jul 27, 2021 at 09:58:00PM +0300, Maxim Devaev wrote:
> 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
>

You forgot to mention what commit this fixes up:

Fixes: afcff6dc690e ("usb: gadget: f_hid: added GET_IDLE and SET_IDLE handlers")

I've added it to the patch now, but try to remember it next time.

thanks,

greg k-h

\
 
 \ /
  Last update: 2021-07-28 08:26    [W:0.750 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site