All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maxim Devaev <mdevaev@gmail.com>
To: balbi@kernel.org
Cc: gregkh@linuxfoundation.org, sandeen@redhat.com,
	mdevaev@gmail.com, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH] usb: gadget: f_hid: idle uses the highest byte for duration
Date: Tue, 27 Jul 2021 21:58:00 +0300	[thread overview]
Message-ID: <20210727185800.43796-1-mdevaev@gmail.com> (raw)

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


             reply	other threads:[~2021-07-27 18:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-27 18:58 Maxim Devaev [this message]
2021-07-28  6:25 ` [PATCH] usb: gadget: f_hid: idle uses the highest byte for duration 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

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=20210727185800.43796-1-mdevaev@gmail.com \
    --to=mdevaev@gmail.com \
    --cc=balbi@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.