From nobody Mon Nov 27 15:23:04 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 4Sf8VJ6t1nz52pX8; Mon, 27 Nov 2023 15:23:04 +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 4Sf8VJ67Qkz4MF4; Mon, 27 Nov 2023 15:23:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701098584; 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=E2GfouWa9eZZcspeqel7lgUlIhJoAlYr3Ku3tGSi800=; b=GLovXV6ER0MZAApMTa9z2XeQVOrZqpft7KGSXh5++fv6hXy3aDQAsIgSYKK4sIWZ0P/TOl H28X9NlR1NgEtEBKwOln3HYrPZ+1KmVYiQZYNmnjdrkgd5GL+cy5lMvGAjaQ1kkdaGBqQt fU5BvXjGTr0vB5q6d8in2yKLCh7SKJjeqB1g8tciJYuansG3ytd92HWbu0N6rvt+KJuXsN /MehWZh+NFeeAJtHG2yjHTYXntv/ets11+549PnKPQ7asZg3mLMD0sQFRAOKs2DrHhVrQ8 lg5vrptbXmNoxVRB5FK/79yzEHvi5wmpFRcJB2ozDeD570bbvCXeEluINgI5WQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701098584; 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=E2GfouWa9eZZcspeqel7lgUlIhJoAlYr3Ku3tGSi800=; b=b0XCzPDtrQl9ZDBt5xBTBH8ITXP+GaICbPDoRgYyO1Zboq6ePlimcHCfBMYHPJ6g1H8PrJ bB15+N90vmwU0l23ZTgDwtKHLLncZkqyz2z/BgNd5R74EGi6JTxsgYqLSgVXTISYq03ECn TkUukTD2CmFDDN3BwtGB+2GK8gQ0Ry1Lz13sLzT14WGWNlN9LeiMsf3GlRrlJlvXTuEwOs w8O75SRB/bVRyt1nBDeOrX/OYBmREuhu/lsjWc6V43a6e95P1SAqQhh9SfmfIbWudKp/Jy jajV7y/03edjrk6D/su7fpZS2yl0ZDp6uhjCBWFOB3P23J5UNuCrT0ZQP0Tw3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1701098584; a=rsa-sha256; cv=none; b=K5j8HYk+FWBkfvHov4lGBlX4OQUfAxPQ6D/V9KZB7yO2qeInFlXbmUQudW3EJH4P1mVrwb ebuCLGL9nnkPpyAnTcfsnz1LWy+lpWi9Ea3HcRS6eoBDahW1BwCgDeE/THdYbJLrS8TbRW Tp8J54mYlglviuAn602r1lc8uFIMlzFey54ca2Fz91iMga56dKWZ/eUnMzU+F/oSm4+Dii ysMJr+aQYLG+CHRqnlHol8aZZzDVk+Re27r3QaPsxA3Qp7GzVEkLutqbcyBscF8mUNTRZ0 uDfXAsME8vcTdcbneHJVKd8RnxhOraMxGbDhVeaT20katQNi1hrG26QJv/aA9Q== 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 4Sf8VJ5DFtzk35; Mon, 27 Nov 2023 15:23:04 +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 3ARFN474096565; Mon, 27 Nov 2023 15:23:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3ARFN4rg096562; Mon, 27 Nov 2023 15:23:04 GMT (envelope-from git) Date: Mon, 27 Nov 2023 15:23:04 GMT Message-Id: <202311271523.3ARFN4rg096562@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: 00b6fafcc1f1 - stable/13 - 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/13 X-Git-Reftype: branch X-Git-Commit: 00b6fafcc1f174c7819bf3ff0d19e2244267ed76 Auto-Submitted: auto-generated The branch stable/13 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=00b6fafcc1f174c7819bf3ff0d19e2244267ed76 commit 00b6fafcc1f174c7819bf3ff0d19e2244267ed76 Author: Vladimir Kondratyev AuthorDate: 2023-11-02 06:20:20 +0000 Commit: Vladimir Kondratyev CommitDate: 2023-11-27 15:20:49 +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 5cc4f1167237..e7adf8d0e7d1 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;