From nobody Thu Sep 19 21:44:45 2024 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 4X8pvd6Mf1z5XWW2; Thu, 19 Sep 2024 21:44:45 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4X8pvd5p96z4q7C; Thu, 19 Sep 2024 21:44:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1726782285; 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=Oh8598+fdRhNsqFFNYazgWW/4nqHIbPg+BsqTjOc6ZM=; b=KOjcsu00Ksg+fzRUXfUR7tUQUZKqD1HCztwmNXer0rJuNFWx9hVee2mQwWpMaaM8IrcGbo 1EgRDFCMaMLPpZNM7hg3qj9V6QkHoemMe0/7hVs33WJxKzUGur/wumtcqWqLsIqQ0jEhfw hu12BBv5TYmjeLh+kh0EHKDpeoQ23qQnkS9Gyj8KhwoDWJWsx0OQAAp89jMHmcf1f8YN5D yjlqe9PxD/j+wGNu+/A4yvEgm/KWvMFhaRNn+V0oLA2VJcIKTq/QgfHs9ztlSzqLmnFPNW 50XF8QumAnvmWurbAnMwAlY5SI3zRDmAUr/6Z62ig2PkNnYP0ULfofQauCliiQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1726782285; a=rsa-sha256; cv=none; b=e88GqB4Q5FjFedtxA3hUOav2e4TjfcUymcIqGhFuZ0yzimUGT8o60u4sxelhBhs9G00qld Wcb1IlQhlhaOlotoekS2OLVzzEWcM8vWBtTTzSAvwbQ20BQ89+3QLHfT0m2lVpCoys0TyG n/PjvMBIDvPUBoLQcbYgqB+5hGo+6eg8zrYadD4N2HkAyUIkzA4ve7yms3ubgMDj2gxwem 6o9UjflTni3leSNTX4CyKO15XnZoGGHS6wYKJKtLkgR3XHTglYwtCimTqfBxbCxocOyxIJ fS3jk276MJIOTfvBiuR3L2Y+1qd+TXMgUmK4RPd+9KLFJ/nTFO1ijGurMG7Z2w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1726782285; 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=Oh8598+fdRhNsqFFNYazgWW/4nqHIbPg+BsqTjOc6ZM=; b=TMNO5N6ahe0y8hpxjEKKtdsAaOZpPtSBcUO4mTNbTgASJ5v28FdaaOvGXxl5CHqvoo6iCo DRStQfpeXrt7FYy4ybWNnbq/aRp2j7nh0wZGsN9o26Hfih65upZ7QRdH/VIMUgcDNwvuSa HKM1lAZzinAN2o1w6QykPIrwDfJH2WqLR4lD+RAI4aG6G69fRd0ywy+DYdI9+XOPKiMoe8 YnwusVsz6sIyfQLXBl0u1eympfGTVER0ApiltwSNWW3mh8ZB0yewrxj8yeJfYMNvOksCLR HSkzIxZy5hXzfFeIG3ygEOh26v77X9U1Pv67136OHxGMtMTyL1Ge3NNi9V+qxw== 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 4X8pvd5K7MzMYX; Thu, 19 Sep 2024 21:44:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 48JLij5U089515; Thu, 19 Sep 2024 21:44:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48JLijqM089512; Thu, 19 Sep 2024 21:44:45 GMT (envelope-from git) Date: Thu, 19 Sep 2024 21:44:45 GMT Message-Id: <202409192144.48JLijqM089512@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: 66292e70e84d - stable/13 - ums(4): fix incorrect mouse button reporting via evdev 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 66292e70e84d01f24d8d571e14f31f8793ce8d89 Auto-Submitted: auto-generated The branch stable/13 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=66292e70e84d01f24d8d571e14f31f8793ce8d89 commit 66292e70e84d01f24d8d571e14f31f8793ce8d89 Author: Niko Sonack AuthorDate: 2024-07-02 19:27:25 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-09-19 21:44:02 +0000 ums(4): fix incorrect mouse button reporting via evdev when ums driver receives non-mouse HID report. This results in unexpected button release event. Reuse existing sysmouse logic to keep button pressed. Reviewed by: imp, wulf MFC after: 1 week Differential revision: https://reviews.freebsd.org/D45838 (cherry picked from commit d6888e211b07be79dd8de3145ac41b365f482ae8) --- sys/dev/usb/input/ums.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/dev/usb/input/ums.c b/sys/dev/usb/input/ums.c index d8dc2e8f19c3..68a5a33e5e5c 100644 --- a/sys/dev/usb/input/ums.c +++ b/sys/dev/usb/input/ums.c @@ -320,11 +320,12 @@ ums_intr_callback(struct usb_xfer *xfer, usb_error_t error) if (++info != &sc->sc_info[UMS_INFO_MAX]) goto repeat; + /* keep old button value(s) for non-detected buttons */ + buttons |= sc->sc_status.button & ~buttons_found; + #ifdef EVDEV_SUPPORT buttons_reported = buttons; #endif - /* keep old button value(s) for non-detected buttons */ - buttons |= sc->sc_status.button & ~buttons_found; if (dx || dy || dz || dt || dw || (buttons != sc->sc_status.button)) {