Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp710944pxb; Tue, 12 Apr 2022 11:20:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz/xCkU1o0b7wabeqPf9XD4LqJH6gF+yxmR4OEQtEr5GiXQRZqgoui3KQwq3M6d7Lyr/HEm X-Received: by 2002:a17:902:a9c2:b0:156:1859:2d05 with SMTP id b2-20020a170902a9c200b0015618592d05mr39679525plr.86.1649787645358; Tue, 12 Apr 2022 11:20:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649787645; cv=none; d=google.com; s=arc-20160816; b=WIwRCgGMesRRYdDRpJpCaT7ov10I5V8Kz9vHQ76BJPpxpgzMiU6U6TtaHSD7PfdECm Znj6ZBVBQ6NeLTuNTcE1ae79b37iYPcIbrgVofvL6gnT95IPZJH85S4uMoyG2PpAISmC deN7HBbMFiyXiqvbsvCSTunRBm5AU7VgFRt5AAzECUO6NCKvqy5IooOsQyRgnGPmT0lp iPVaTUd30rt2LtLbAY7z3kwugww446GXb+ofYPHNm3wXoLVAMsMLAqhaa8x+8Hm4sIs3 JIzUAPJTq23RDkijrxRkLCjiO1elGGCwo/tsN2oJmk2Trxp4grx+asb0YIGUToh5hITZ uBzA== 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=RxNxfZ/WMYlAQSQ/udH6rndCgC8Cv6lIdjV8XSkZM0Y=; b=n3+eRLzg9guTlOk6ZSPMC9U54f0+SNXuIwt5hvDdRAez2k1YG/dMv+RM2r7yjKnghM zrMZ53Pm3LZvZGkYKXd3x6C8R0F91D+z8z8CuiBisiULY5wuAi2zb+wVDec3Mlkqop+S AsmKaaYT95AsVSc6gaevmYzeFr+AfFt5uC6bGcSjMdlaQBMkJvQWxvkRtWjatsFQ98Cm 104YV+4KYK69cZv8Bnx1MPtDa6C8azWs80VQCeUT/TcGdWkm6giLC1i35IrIgSFw5Lhr f3NqzKqE2vPOdci1NgIiKFzg9pqO1sJE6OaiWlo+NI8yOQYopbmy03wyLVaJsBauUfm4 rq2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WlLeKH9n; 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 z195-20020a6333cc000000b0038222818815si3453267pgz.112.2022.04.12.11.20.29; Tue, 12 Apr 2022 11:20:45 -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=WlLeKH9n; 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 S1347591AbiDKPDG (ORCPT + 99 others); Mon, 11 Apr 2022 11:03:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347630AbiDKPCk (ORCPT ); Mon, 11 Apr 2022 11:02:40 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D092422299; Mon, 11 Apr 2022 08:00:26 -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 6091761530; Mon, 11 Apr 2022 15:00:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CD324C385A4; Mon, 11 Apr 2022 15:00:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649689225; bh=WQgiPWw15vZto8Oz4YQkJk3Gl2iuHt80f6Y58X7n7co=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=WlLeKH9ng0yCZvpA3Et0fAqBe5kAgqcQwXe7UKuqut42rDdVgVCfcNjlqzjgYHei+ C20cmatbGojQapZUjpDeFOEijhnpcHNSMZnQOxZc8jehKDi/gp+eXd+t2B6t9re9he ZcC2XiAVUFQridhcvTxShgjHRERKHyOMRxc0U97XHF2E/QC5+qMeJjx2YcMP4VoFb6 uhNIsaVL7rLa48QHVtmMksDGttg4kwySmeVQs5YpDw2mWwQmD6zULx4fJpDt08W6Zu MABLvJTzOtS8ImU/jlYohoqlUZk+WIzu4eq/k6lM8z9dcgj3wc0N0i2zTZw/GJjKwD R0vdXURSU5aGw== Date: Mon, 11 Apr 2022 17:00:22 +0200 (CEST) From: Jiri Kosina To: Josh Kilmer cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, Benjamin Tissoires Subject: Re: [PATCH] hid: asus: ROG NKey: Ignore portion of 0x5a report In-Reply-To: Message-ID: References: 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 Mon, 14 Mar 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 Hi Josh, thanks for the patch. A couple remarks: > --- > drivers/hid/hid-asus.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c > index 08c9a9a60ae4..73fb9fc0701c 100644 > --- a/drivers/hid/hid-asus.c > +++ b/drivers/hid/hid-asus.c > @@ -1212,6 +1212,14 @@ 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"); > + // On the 0x5A input report, change count from 5 to 1 > + rdesc[205] = 0x01; > + } - your mail client whitespace-damaged the patch, so it can't be applied; could you please fix that and resend? - the comment above is (a) using non-standard kernel commenting style, and quite honestly (b) seems a little bit superfluous Could you please fix that up and resend? Thanks, -- Jiri Kosina SUSE Labs