From patchwork Fri Nov 11 19:45:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Bergmeier X-Patchwork-Id: 18984 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp937644wru; Fri, 11 Nov 2022 11:59:59 -0800 (PST) X-Google-Smtp-Source: AA0mqf7CQN5bYdb7sbbf/N92lVd5YFsQzNybRrU2OBRoV6TL21VrEJXIaOrdwl6wYZjGspJnORB2 X-Received: by 2002:a17:907:1398:b0:78b:a8d:e76a with SMTP id vs24-20020a170907139800b0078b0a8de76amr3138943ejb.725.1668196799525; Fri, 11 Nov 2022 11:59:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668196799; cv=none; d=google.com; s=arc-20160816; b=WgtXrXS8yfkhyPm/jc5RfWjDs8kQJQ4hfVIwlVrWRS3TjiCCyDS2ZuoS6ZBpuBa91+ +QFfCTGS7pqLD1kTyfEn3x3GIc97YCjeaCRt7p3KWfGriJixYkp0pgmjvct85S8hmCWY upF0jYSpNihtQTGLN+9hFV8tLG8kMRa76SNnIUu58mzGQW+OtQP8uJu/2VTdvhF+Z+f3 NXgb7ZitRi9UEddRHaGgma/pTTAHI5o/zPuAVf2W7RYh6/lFg39mi3Wn5cg3dQ7isYKO VSIscUroplR6wqjtzEDXAdsydECQoDDlESftPF0Wi6+Q6R9AzYIzILp1/+cZYAumcHZy LZog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:ui-outboundreport:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=HvWIV4rjos1isd7q6hqppdAIDD7LSEl0gzL+KHCMars=; b=FdWPqW0NCFncLgFDWFipgSXX9H2JOW9eP+QtGnJZvw/5VeTt2U/p6YQxiyvbuEuucf qc++5x5O1pPnbpmbMWzA9V7dJzfwPsZRZ5akMpdW4DLAhgqsjwMznoWCRnVwCRVf/4yy ZHeg3cKUNRjwPYq446yi5pcIQwZ9hdIDVrfFhcP1TP/zg6E8VzZ6kXHPgJDpHFKgDEau I4eiwdNi5PMO2cT0liIT4iNbkTv27j+sTdZYYjATOn0bsGWCg3M4gUllKkDD7A97HeNd RMAyTqkFJg4mFSQXherqvdFxbogKSJ39YbshAyBZO6Gow/wMe+EDMSxP0TBRtY+s8++k p9yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=s31663417 header.b=ZykDxtrJ; 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=QUARANTINE dis=NONE) header.from=gmx.net Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id js15-20020a17090797cf00b007ae6869f9d9si3105921ejc.419.2022.11.11.11.59.34; Fri, 11 Nov 2022 11:59:59 -0800 (PST) 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=@gmx.net header.s=s31663417 header.b=ZykDxtrJ; 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=QUARANTINE dis=NONE) header.from=gmx.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234090AbiKKTqO (ORCPT + 99 others); Fri, 11 Nov 2022 14:46:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233851AbiKKTqM (ORCPT ); Fri, 11 Nov 2022 14:46:12 -0500 Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77879637C; Fri, 11 Nov 2022 11:46:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1668195958; bh=yIQdbqKmMk0fkcfdZ1ob+a4oeQtt5Pk2MeJErVokxpA=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=ZykDxtrJ8EzugdFIPCZHEtHKaixIt3j3ejnbcTgELV5ISMfBRvF/hsNC21ruYTJ1i poRKi+jFbuumhl6Ng2xLj9FCLlMKF7DvQndpMBM5O3IlezT76rLUUQYvn94aCoPhMv BqqG73TLs5rj1U5+5UwL8tiNu0qqmw8NlJrYgYlnIkAkOnxc/VwcKdTf5ogaOZhGW1 AqIZT1LAk/JVQQlMOn28C72N7NvHedpfamkL7lzRH2NWJjlq5sRr4e3HLU/T2x5NF1 zL0FmkttNeb8RFitDMaQYxFL/ggwBYBqyXKIVW3L3dVrKAvdscfMrD6d5X7Va6Mlvo uJlHuoXIEnS4g== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from 9300.fritz.box ([93.221.18.29]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MrQEx-1pMqIr10BL-00oWkI; Fri, 11 Nov 2022 20:45:58 +0100 From: Andreas Bergmeier To: lains@riseup.net, jikos@kernel.org, benjamin.tissoires@redhat.com Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/1] HID: Send SwID in GetProtocolVersion Date: Fri, 11 Nov 2022 20:45:26 +0100 Message-Id: <20221111194526.1375601-1-abergmeier@gmx.net> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Provags-ID: V03:K1:bjKnsDkSjTyFeheKeU4NmzzGKoiSRrwSuvhF8eUmOTtxxAAWrCy Rx8nYLXkhLhP7PjHjRIPQp60GZXrjAnEMAkNo5APKAdms/8bdMm0AZLO2rgOmwTxlssXK9U SuSM7Z90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PSvvR6sd6khw4Peu6A7Yeh8PEm+ ErEFPx96CG1qwxcgZUTRTLamhoM= X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749231127644715007?= X-GMAIL-MSGID: =?utf-8?q?1749231127644715007?= According to docs a SwID should be sent for GetProtocolVersion. > 0x10.DeviceIndex.0x00.0x1n where n is SwID Signed-off-by: Andreas Bergmeier Reviewed-by: Bastien Nocera --- drivers/hid/hid-logitech-hidpp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.34.1 diff --git a/drivers/hid/hid-logitech-hidpp.c b/drivers/hid/hid-logitech-hidpp.c index a0c148a8df6c..964a523c3de7 100644 --- a/drivers/hid/hid-logitech-hidpp.c +++ b/drivers/hid/hid-logitech-hidpp.c @@ -896,7 +896,7 @@ static int hidpp_root_get_protocol_version(struct hidpp_device *hidpp) ret = hidpp_send_rap_command_sync(hidpp, HIDPP_PAGE_ROOT_IDX, - CMD_ROOT_GET_PROTOCOL_VERSION, + CMD_ROOT_GET_PROTOCOL_VERSION | LINUX_KERNEL_SW_ID, ping_data, sizeof(ping_data), &response); if (ret == HIDPP_ERROR_INVALID_SUBID) {