linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] usb: gadget: f_hid: idle uses the highest byte for duration
@ 2021-07-27 18:58 Maxim Devaev
  2021-07-28  6:25 ` Greg KH
  2021-07-28  6:31 ` Felipe Balbi
  0 siblings, 2 replies; 7+ messages in thread
From: Maxim Devaev @ 2021-07-27 18:58 UTC (permalink / raw)
  To: balbi; +Cc: gregkh, sandeen, mdevaev, linux-usb, linux-kernel

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] usb: gadget: f_hid: idle uses the highest byte for duration
  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
  2021-07-28  6:28   ` Maxim Devaev
  2021-07-28  6:31 ` Felipe Balbi
  1 sibling, 1 reply; 7+ messages in thread
From: Greg KH @ 2021-07-28  6:25 UTC (permalink / raw)
  To: Maxim Devaev; +Cc: balbi, sandeen, linux-usb, linux-kernel

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] usb: gadget: f_hid: idle uses the highest byte for duration
  2021-07-28  6:25 ` Greg KH
@ 2021-07-28  6:28   ` Maxim Devaev
  0 siblings, 0 replies; 7+ messages in thread
From: Maxim Devaev @ 2021-07-28  6:28 UTC (permalink / raw)
  To: Greg KH; +Cc: balbi, sandeen, linux-usb, linux-kernel

> Greg KH <gregkh@linuxfoundation.org> wrote:
> 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.

This is quite new for me, thank you for suggesting it and for your patience.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] usb: gadget: f_hid: idle uses the highest byte for duration
  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
@ 2021-07-28  6:31 ` Felipe Balbi
  2021-07-28  6:41   ` Greg KH
  1 sibling, 1 reply; 7+ messages in thread
From: Felipe Balbi @ 2021-07-28  6:31 UTC (permalink / raw)
  To: Maxim Devaev; +Cc: gregkh, sandeen, linux-usb, linux-kernel


Hi,

Maxim Devaev <mdevaev@gmail.com> writes:

> 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>

with Greg's Fixes addition:

Acked-by: Felipe Balbi <balbi@kernel.org>

-- 
balbi

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] usb: gadget: f_hid: idle uses the highest byte for duration
  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
  0 siblings, 2 replies; 7+ messages in thread
From: Greg KH @ 2021-07-28  6:41 UTC (permalink / raw)
  To: Felipe Balbi; +Cc: Maxim Devaev, sandeen, linux-usb, linux-kernel

On Wed, Jul 28, 2021 at 09:31:02AM +0300, Felipe Balbi wrote:
> 
> Hi,
> 
> Maxim Devaev <mdevaev@gmail.com> writes:
> 
> > 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>
> 
> with Greg's Fixes addition:
> 
> Acked-by: Felipe Balbi <balbi@kernel.org>

Argh, just missed me committing this.  Thanks for the review, sorry it
missed getting added to the final commit :(

greg k-h

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] usb: gadget: f_hid: idle uses the highest byte for duration
  2021-07-28  6:41   ` Greg KH
@ 2021-07-28  6:47     ` Felipe Balbi
  2021-07-28  6:48     ` Maxim Devaev
  1 sibling, 0 replies; 7+ messages in thread
From: Felipe Balbi @ 2021-07-28  6:47 UTC (permalink / raw)
  To: Greg KH; +Cc: Maxim Devaev, sandeen, linux-usb, linux-kernel


Greg KH <gregkh@linuxfoundation.org> writes:
> On Wed, Jul 28, 2021 at 09:31:02AM +0300, Felipe Balbi wrote:
>> 
>> Hi,
>> 
>> Maxim Devaev <mdevaev@gmail.com> writes:
>> 
>> > 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>
>> 
>> with Greg's Fixes addition:
>> 
>> Acked-by: Felipe Balbi <balbi@kernel.org>
>
> Argh, just missed me committing this.  Thanks for the review, sorry it
> missed getting added to the final commit :(

not a problem, thanks for taking care of all these patches ;-)

-- 
balbi

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] usb: gadget: f_hid: idle uses the highest byte for duration
  2021-07-28  6:41   ` Greg KH
  2021-07-28  6:47     ` Felipe Balbi
@ 2021-07-28  6:48     ` Maxim Devaev
  1 sibling, 0 replies; 7+ messages in thread
From: Maxim Devaev @ 2021-07-28  6:48 UTC (permalink / raw)
  To: Greg KH; +Cc: Felipe Balbi, sandeen, linux-usb, linux-kernel

> Greg KH <gregkh@linuxfoundation.org> wrote:
> Argh, just missed me committing this.  Thanks for the review, sorry it
> missed getting added to the final commit :(

No, it's my fault, I messed up the process and everything went wrong.
I will improve my interaction when working on the next patch.

Sorry again. Although I read the manual on working with kernel mailings,
I forgot about some things. Github PRs and all such things stupefy me :)

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-07-28  6:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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).