Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3764931pxt; Tue, 10 Aug 2021 10:47:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwxTCDIGCngkjAlD5MYPFpD5WjWMkwGlsXovdLctIfhZjZ8UY8HiLtwUt29Hq1FhryDMKca X-Received: by 2002:a05:6602:2a4b:: with SMTP id k11mr235329iov.58.1628617643020; Tue, 10 Aug 2021 10:47:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628617643; cv=none; d=google.com; s=arc-20160816; b=rlyzgI+g0ZY+uB7Q5jftMtxX1SwmjKBkVOi283WvovNh5CclsN15AtIYEisZUd+Hev wnFIKa95nE6XoPyAI00MUzosyQvr1936cQUpkjCPymfebRk66ElrP6/C0uVm423heMZW 36txWvaQibT2Q4sTeU7zF3pK0wplpisHUwsD997tC8SNjrJhmtvfe4xnEvfZO1BhknmL epYSHWf49Cnsd08cFzWRMRVA4mmnK7/XIo07CzcLF4zXj8IgBCng4UWc2iz4KpydnCcx u81bCtv2qa9j8tVij9D8PkkTi1CgqEuQzaHET4CzMWiNH1Zp4wOCcFZlNAeLJZvJYdj3 UDYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=BXllwr40EXdi9szsdtepMI3VmgCi6soB5SNRzb6+JpU=; b=EO3WTngOY0dT72bMEATuZVPxpXFgknjEytyQdzwIKb+12sqw4s5Tp59OVoQ5HsV01q s0Z0NIA2yc2NuACxOSgIq6dQNXUMTMDNvhxQM+OANvMmV2olYhdOOQIX04ouynYky+b7 ZnK6B7bErbyXICpVLZtt9o1DAZb800U7pbqscGad8POXWvtNKQZTJNi91XjaOS8gaALH m5Fpa/rnp77xUYu6MWu1soR7peHK8vqb+md9LJTkwVmDVs//YWMs1LaKmtTFKcscU8L1 xqSpzF4Q/CQScRcIdE8zL8Jnkr+iYHVn8HxbzI6AROTSomneENyotxq4CLwaNN9oizES oeqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=h3AipaDc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g9si13549044ila.119.2021.08.10.10.47.11; Tue, 10 Aug 2021 10:47:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=h3AipaDc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236529AbhHJRqr (ORCPT + 99 others); Tue, 10 Aug 2021 13:46:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:59726 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235858AbhHJRnx (ORCPT ); Tue, 10 Aug 2021 13:43:53 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 75FB46101E; Tue, 10 Aug 2021 17:39:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628617157; bh=7JPd5TI+quikPazaZthqblTvGHnfh1lhRrFWrqZR3Sg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=h3AipaDcicyn24KJkw8IrI5CtlD5uVHIPbQcH9QfoQNlk0hO/Q+l50o1PGeAN4UrW YiK83XykBVP4SCrVKoYzm+tWQ8282sncb6u1S7tmWCCu06gUnoZ/XAAOC4WNgWtl4y 6r4j/AyTco5pERTFsStDB+wDlleK4eY1vR/ap95A= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Maxim Devaev Subject: [PATCH 5.10 069/135] usb: gadget: f_hid: idle uses the highest byte for duration Date: Tue, 10 Aug 2021 19:30:03 +0200 Message-Id: <20210810172958.061635813@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210810172955.660225700@linuxfoundation.org> References: <20210810172955.660225700@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Maxim Devaev commit fa20bada3f934e3b3e4af4c77e5b518cd5a282e5 upstream. 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 Signed-off-by: Maxim Devaev Link: https://lore.kernel.org/r/20210727185800.43796-1-mdevaev@gmail.com Signed-off-by: Greg Kroah-Hartman --- drivers/usb/gadget/function/f_hid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- 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_functio | HID_REQ_SET_IDLE): VDBG(cdev, "set_idle\n"); length = 0; - hidg->idle = value; + hidg->idle = value >> 8; goto respond; break;