Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp435707rwe; Thu, 25 Aug 2022 03:12:01 -0700 (PDT) X-Google-Smtp-Source: AA6agR7KCX3NTbCtJK0qfyFM34StqqUK7O4sJEEyfN1pBFJ8CplKNZppSyO5GHz4as6zTRm73yBE X-Received: by 2002:a05:6a00:174f:b0:537:6845:8b1a with SMTP id j15-20020a056a00174f00b0053768458b1amr3612509pfc.68.1661422321310; Thu, 25 Aug 2022 03:12:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661422321; cv=none; d=google.com; s=arc-20160816; b=dVphJd60fXCrJMztSAVPhHJXZD6jW4rd0qe3xRD7OC/ZCRgT0GF051rCCtkTAGtwAf 8Go7buPszt2Dg7iov4hFKR5x23nIbhNrzAbyC774wPNHQyNfRXgS+rRwv8ElOnfZqViT P1ZabHCRTXPNSY0DaAfBfe0FEn7xj2W5Q0KHmf4UMSahVtxbQslEnncg+LKx7Klf4qY1 ghPK8M/JxHR9WHOnVwkyzBfK+8BZwD2cevXm4O8wanH20AqZzGJH/XboQjwUk4172oNf Zizr9vuNvasNN0gsHwkW/HgyVFsX2peyIXKmfX+4VlPcgltmcjbEgeIJJIrWmpDM+Vtr g/Ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date:dkim-signature; bh=xgHBum2YmQBa3GtpfSSAATG4A9wpRMMc4HoEGlebCNg=; b=PDgf4KXyqumTLAooaGN7/OXKG8sBG86A4Ponq50Qo30lNPK7L6XghfOUBpKTyiXjNy DxvtvLLyaTUKYOpzJRe1MeTaz1ucQ5E4bxJeysNbtFno674XrYgrWMP9LZcggLt4FWOB PpIwwnmd77CBTJbxY8SFOsOZomA/jBNeXbWO1WWjrkrKbx/g5OmIwKesOivkCfXWbgLu DXZpbAwIuaBOSrLcHcGQ6sgfPHVuTF7y2ioEsMu86jrwTINnugxQbkgrNFxjUiidMFhk /MkSD7OVqJkEqoouZ12eNlt0MlYDKX7OGpfyebS4WIUB2B2RVgyEzySEEKbIsNxseGSR H75Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pkawkFSc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nu11-20020a17090b1b0b00b001fb7cecce2fsi3954090pjb.93.2022.08.25.03.11.47; Thu, 25 Aug 2022 03:12:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pkawkFSc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240259AbiHYJb7 (ORCPT + 99 others); Thu, 25 Aug 2022 05:31:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240188AbiHYJb5 (ORCPT ); Thu, 25 Aug 2022 05:31:57 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B43AD97D74; Thu, 25 Aug 2022 02:31:56 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id DF3A661BDF; Thu, 25 Aug 2022 09:31:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 44700C433C1; Thu, 25 Aug 2022 09:31:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1661419915; bh=kQ+7EJOiXSBW5POE9hfOgVfz2rzI/eDdTq6LvSFO37Y=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=pkawkFScZat7f6igWV8BasrNXsD4oAVxWX3iHw+Y9u0d5L9Relq1sDz9CiuHqroAD XGGQ8IaszbnkIn7VPdnNtCXQ8e1zpvPBpZj/FB1rqkZpacJTbf4Gq8FhEoS5Jbo+1E nhqFx0E94k5HU54PfCCe/nY25Wlt7ADXhD2FovIRtG87wcorVlexkfUV7UxJoaHQ2e He0ka/xATMkV/suoj7J2V1NbGHaj6yMvAIYgJ34YbWicdOIrb9Ud/DUWU8f8krA4jW 54HNbISwCra5CawZpcVGbUHrUk4zNKI348FuKWSQF24r36YWyCdh08G9/QVO99EN3s 94MovDjD7BQcQ== Date: Thu, 25 Aug 2022 11:31:51 +0200 (CEST) From: Jiri Kosina To: Josh Kilmer cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, Benjamin Tissoires Subject: Re: [PATCH v2 RESEND] hid: asus: ROG NKey: Ignore portion of 0x5a report In-Reply-To: <20220728175111.18769-1-srjek2@gmail.com> Message-ID: References: <20220728175111.18769-1-srjek2@gmail.com> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 28 Jul 2022, Josh Kilmer wrote: > On an Asus G513QY, of the 5 bytes in a 0x5a report, only the first byte > is a meaningful keycode. The other bytes are zeroed out or hold garbage > from the last packet sent to the keyboard. > > This patch fixes up the report descriptor for this event so that the > general hid code will only process 1 byte for keycodes, avoiding > spurious key events and unmapped Asus vendor usagepage code warnings. > > Signed-off-by: Josh Kilmer > --- > drivers/hid/hid-asus.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c > index 08c9a9a60ae4..b59c3dafa6a4 100644 > --- a/drivers/hid/hid-asus.c > +++ b/drivers/hid/hid-asus.c > @@ -1212,6 +1212,13 @@ static __u8 *asus_report_fixup(struct hid_device *hdev, __u8 *rdesc, > rdesc = new_rdesc; > } > > + if (drvdata->quirks & QUIRK_ROG_NKEY_KEYBOARD && > + *rsize == 331 && rdesc[190] == 0x85 && rdesc[191] == 0x5a && > + rdesc[204] == 0x95 && rdesc[205] == 0x05) { > + hid_info(hdev, "Fixing up Asus N-KEY keyb report descriptor\n"); > + rdesc[205] = 0x01; > + } > + Applied, thanks. -- Jiri Kosina SUSE Labs