Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3756693pxt; Tue, 10 Aug 2021 10:35:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyijwrv0Xg1n6nG9urRfyAQ3Lt/kyMwjUIlHMn3PwCXziyRL6l7UyGOUk5rWBU/ktEc7a4M X-Received: by 2002:a17:906:17c4:: with SMTP id u4mr29207080eje.481.1628616926040; Tue, 10 Aug 2021 10:35:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628616926; cv=none; d=google.com; s=arc-20160816; b=FxFVkImmQdFX8N2tn64YENZfGvSzd6kC/H+3ByYaxwWlELUNX3UI9hWHE2QPSBzotD Wu2sbyoNk74CrxhqHsiTLuJvULvBXrYUA2RZksxd5TVH41/pUb8l54dNJim18f4WeiuN YQIOmuGnKnvO8tNrZbh2HYCpSipfY6JYXn/wpkU39fbOfU5VeWAFJHAfHaCLLGqOfJHU SeS5jcZU1LTqgeEXADSWHe3HRS1G5f4eqYpQzSNl98u/RoooOCAY0JzAup7i1c9Zq/jX PEB9mLLY7Pz20fg3V994eZ/xDGJWCH6FXqNOaj9c22FSsUklvlLeXGQBCER4LDR9pf1I 502Q== 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=k+/AElgpTkiEMRz3UjnNjTiGbDXpwb1cYKpGQhyshpc=; b=VzRkkebXgkLH8883X9pxrOJBceJktOwCzIM4Dr8xNCadOIqbM4xWcBnrvkl6Vf07Um JHceuUblOWph3bPnKYe90E6xq5erc0d07zADlCvF1Xd5koFbKMkoRzpe0ahKAwiQaQUq LVvCZAYWm779C/6tvTkxGvrYaxkizJKDNWWtWPOBUtgfLlFYDLnb9Z2l2XnytDTWEhNl VAZhadByToLuYJQgKejFDZM1TU+oddr03gFEd2RLmbTX7l/yhvP0wj7V34WXYWUEAznG ziokjOKgLx4kN9mqqMDqzf2pXeb4CUFfozTMBpdbRT/aZhkqOUeWLT2rq33WrU1FPkUM zsTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="BeNVg/pS"; 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 lo22si2839123ejb.696.2021.08.10.10.35.01; Tue, 10 Aug 2021 10:35:26 -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="BeNVg/pS"; 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 S231851AbhHJRdP (ORCPT + 99 others); Tue, 10 Aug 2021 13:33:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:33730 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231883AbhHJRcx (ORCPT ); Tue, 10 Aug 2021 13:32:53 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8AED160E09; Tue, 10 Aug 2021 17:32:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628616751; bh=d/+valeJjRb3Dr0/1u1KGw7QRstu5u3fNpILih65bG8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BeNVg/pSbJaDq3yjBRCyIY/tqPpEsW4XZO3eg/lB1Xm8gK9FBkATyLXVwARGkaS/n njdqZlOidyhLnfKYBkA/wHdAROr6NrwbbizXYLpd0GIhMggepN/38QpfCILueyNpKv 1uOfWhoeaZoOwgZu4zlfJkWvnF5WhhYCzg0xh/h8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Maxim Devaev Subject: [PATCH 4.19 30/54] usb: gadget: f_hid: idle uses the highest byte for duration Date: Tue, 10 Aug 2021 19:30:24 +0200 Message-Id: <20210810172945.169040364@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210810172944.179901509@linuxfoundation.org> References: <20210810172944.179901509@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 @@ -579,7 +579,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;