linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Maxim Devaev <mdevaev@gmail.com>
Cc: balbi@kernel.org, sandeen@redhat.com, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: gadget: f_hid: idle uses the highest byte for duration
Date: Wed, 28 Jul 2021 08:25:23 +0200	[thread overview]
Message-ID: <YQD4U67wFqtXBGu1@kroah.com> (raw)
In-Reply-To: <20210727185800.43796-1-mdevaev@gmail.com>

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

  reply	other threads:[~2021-07-28  6:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-27 18:58 [PATCH] usb: gadget: f_hid: idle uses the highest byte for duration Maxim Devaev
2021-07-28  6:25 ` Greg KH [this message]
2021-07-28  6:28   ` Maxim Devaev
2021-07-28  6:31 ` Felipe Balbi
2021-07-28  6:41   ` Greg KH
2021-07-28  6:47     ` Felipe Balbi
2021-07-28  6:48     ` Maxim Devaev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YQD4U67wFqtXBGu1@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=balbi@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mdevaev@gmail.com \
    --cc=sandeen@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).