Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3759786pxt; Tue, 10 Aug 2021 10:40:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxOpKVVi8+GKjM6346JZpe3KP6xtPdnUD3kEVEQW7iMhzG0+Qy9SEcr7+Ymlgo/5UXVCCne X-Received: by 2002:a92:c848:: with SMTP id b8mr1513216ilq.54.1628617205140; Tue, 10 Aug 2021 10:40:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628617205; cv=none; d=google.com; s=arc-20160816; b=R4cTNRr1S3Me38CAELOnMRISZCWv1ZrbUwjVeQkCzuBjIP8sktjgDQK13+sJV3RLsd XCQIx0JqpwX2/MmhjxXn4EaA+1RfbhrQCCNNSTPyusBqP1fuSbCo4KKhAZ3Efb6hHfaa a1aAJ6zZsqCScytUOYXM1mzCXnAi2MgOyQoNNwaR8E7tNZqXdgK0xsCF5qMiRSKXTX0N cOgZTIP7TMCklb1XXnoNicLYGyJRbp5sx9o9DjD3Ie+iJGynW07EAt42h6LVVrH2uryQ 2RkcPh097F72r/jgzSh8P6wuYmBC5eYhLjfMcZljtJ964VcglNPoRh/jGHq6NrVY6ASv N4QA== 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=hxwz74ebSB9zorJG8EXjWVNB9WH+J9voMPNf/t4w2wP7rtw5xNBU9lJn7T3TL0uTqD pLytt8XdaSljeECs1lSTKoNxOSdseZeJSG6v5Iw8jOi3CbglAPjR3e1pCL62Y7/ctcXR cPl5aIHNliG88C2CnWPVVdS22FEFGgSA7qVS2r0WE3JX9x8TMoYvLxb/BS3ByyEeOa7s kjGvfeq5JmwniYCgpMboT2UKI/Lid26vWcLXzZetCYVVHqMu/ykokjxVZKSA8EIkYoQf lgm/v0hLIw+vkQpthqid0Aw4kKiBhEvJnUg8FKaKsA7uHi3QTpPNkkm4IF2Ok9h1gLcN yFLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=h6iO2kRH; 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 f13si23162673ils.29.2021.08.10.10.39.50; Tue, 10 Aug 2021 10:40:05 -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=h6iO2kRH; 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 S233820AbhHJRh1 (ORCPT + 99 others); Tue, 10 Aug 2021 13:37:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:37254 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232656AbhHJRfn (ORCPT ); Tue, 10 Aug 2021 13:35:43 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id BDE3660E09; Tue, 10 Aug 2021 17:35:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628616915; bh=d/+valeJjRb3Dr0/1u1KGw7QRstu5u3fNpILih65bG8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=h6iO2kRHpoKjeqxoxGjdoeUZuNKU9+4B+8LeJItpuwod2nPSIqBhHxfiEhJ4PjRtB NBUSVLBAnYocEAxfKL+6s00/ojRFdKjbobQFeSfxsghFp/ekuv1vw/ehdNzrJnDi3g bNBFu9oLehipP0+kRliNGiDLdr8aWUTfBT7fijr0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Maxim Devaev Subject: [PATCH 5.4 47/85] usb: gadget: f_hid: idle uses the highest byte for duration Date: Tue, 10 Aug 2021 19:30:20 +0200 Message-Id: <20210810172949.825274932@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210810172948.192298392@linuxfoundation.org> References: <20210810172948.192298392@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;