From nobody Mon Nov 27 15:22:48 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Sf8V11VnVz52pK3; Mon, 27 Nov 2023 15:22:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Sf8V10q4pz4Ls7; Mon, 27 Nov 2023 15:22:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701098569; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X3sSvpiZtxpuvNtfeBjPTvy2QuA/TnV+eI99C3eHt6I=; b=ZmqbvK/OM0Z+0Vw0QjluF9vgAFHDvNSTI/pC/qq2ObGVKihn6HXLih6pb6IZ3JemoxJjd1 Q8BJQtJxVv0XdiL3r8xsBG9YPJlCbhsWGA/67nRUateiCs4Z9qwdW5ZWM83PaWmvbnUZNM COAVQ0DOkpDqgNTcG++VGnOoGbfCUtBm00yuMBfaxhqKVDw2D/qe2mzmk0+A7F3ok4nhUB KKy2evUuXJNxnqQO88mqRf1HBMXbv7J4sI+tTssTAqxkt/fvJvOVixYlCPgoMdBnewtTM0 Kln9wESNno0tZ4VX/J7mqyx0t1wdfT4oDOU47BLb8a3tVR6Tgsq0ilXIqkzNzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701098569; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X3sSvpiZtxpuvNtfeBjPTvy2QuA/TnV+eI99C3eHt6I=; b=W5/WqDPouenF+gfcn2OpIJePRzRxgRYowZPN+MK4I9M0uCHU4I561agXmBBwCnFV+vlq8L djFMO+foQxFS6pJNfksczndQQmKWPqeFrKQPd47izYzOjScUw2kmrWAMyGOig+SvByDLVF WS1lAtim1WFuPOZ5nL3E3iTuBddLYefxF6L1N5rwM3YUJi2fdOj9kVGnsmY9d5d3vr0Kcj FQrVnvy46reubU5nNnwM6s79cFO89kmtH2BTNbD5tzKn5/S8ywm7vVZItvhrwqp1YxZJxi YVkwkLiwtRwbR4KBfLtv3GfsC4U5oNbk4rQSpPS3kTQoRS7aD53Tt8BOgroivg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1701098569; a=rsa-sha256; cv=none; b=GapYaNGOd+Matx3XT/hx8G2hpl/qbKW+fYqKr5gH+M3RV+i6VWmt2DeGzLvQJ8LGbbf1kH ieOvtKnWus4/hDlkrMgcpbgQrU4gq+D23pqSDBsYZau2YNQA28960W2esLbE7OTlp8ZjH0 hhLMUXxCA7ta1iGO5FJHu+uG0DnokGC2MUghsmNdlFzrl2ZfzWc7tLiNVHNKdxmxEPXIct CKnFikLbYlMLIqxwmqPkPB1AiXd6GDVA03tZCcnw6JJecGiLajjpG3aMhrkEBOHnCHWQZu ltIB2b2aVXQDoU4LusAMGD/NPfCu/UEzRlgeqql4pSkc4K6sQD3VSXea7t1pVA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Sf8V06jM8zkNK; Mon, 27 Nov 2023 15:22:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3ARFMmcX096309; Mon, 27 Nov 2023 15:22:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3ARFMmd9096306; Mon, 27 Nov 2023 15:22:48 GMT (envelope-from git) Date: Mon, 27 Nov 2023 15:22:48 GMT Message-Id: <202311271522.3ARFMmd9096306@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: 16a379ffde4b - stable/14 - hmt(4): Do not require input report HID usages to be a member of TLC List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 16a379ffde4baadc5bc5bae23658b0bf2ff6ab2f Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=16a379ffde4baadc5bc5bae23658b0bf2ff6ab2f commit 16a379ffde4baadc5bc5bae23658b0bf2ff6ab2f Author: Vladimir Kondratyev AuthorDate: 2023-11-02 06:20:20 +0000 Commit: Vladimir Kondratyev CommitDate: 2023-11-27 15:20:16 +0000 hmt(4): Do not require input report HID usages to be a member of TLC Some touchpads places button usages (in HID report descriptor) in to the 2-nd level collection rather than in to the top level one. That confuses current code. Remove collection level check in HID report descriptor parser to fix device detection. Reported by: Peter Much PR: 267094 (cherry picked from commit 1d46c8e5c2702c141c6be982b3ca44e74d1cb8f1) --- sys/dev/hid/hmt.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sys/dev/hid/hmt.c b/sys/dev/hid/hmt.c index 199a6a2ff045..f6b593222317 100644 --- a/sys/dev/hid/hmt.c +++ b/sys/dev/hid/hmt.c @@ -744,14 +744,13 @@ hmt_hid_parse(struct hmt_softc *sc, const void *d_ptr, hid_size_t d_len, else break; - if (hi.collevel == 1 && left_btn == 2 && + if (left_btn == 2 && hi.usage == HID_USAGE2(HUP_BUTTON, 1)) { has_int_button = true; sc->int_btn_loc = hi.loc; break; } - if (hi.collevel == 1 && - hi.usage >= HID_USAGE2(HUP_BUTTON, left_btn) && + if (hi.usage >= HID_USAGE2(HUP_BUTTON, left_btn) && hi.usage <= HID_USAGE2(HUP_BUTTON, HMT_BTN_MAX)) { btn = (hi.usage & 0xFFFF) - left_btn; setbit(sc->buttons, btn); @@ -760,13 +759,13 @@ hmt_hid_parse(struct hmt_softc *sc, const void *d_ptr, hid_size_t d_len, sc->max_button = btn + 1; break; } - if (hi.collevel == 1 && hi.usage == + if (hi.usage == HID_USAGE2(HUP_DIGITIZERS, HUD_CONTACTCOUNT)) { cont_count_found = true; sc->cont_count_loc = hi.loc; break; } - if (hi.collevel == 1 && hi.usage == + if (hi.usage == HID_USAGE2(HUP_DIGITIZERS, HUD_SCAN_TIME)) { scan_time_found = true; sc->scan_time_loc = hi.loc;