From nobody Thu Sep 19 21:43:29 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 4X8pt96y4mz5XWSl; Thu, 19 Sep 2024 21:43:29 +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 4X8pt96N8Tz4pjN; Thu, 19 Sep 2024 21:43:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1726782209; 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=xtm2i8PFr6vMDRxJzAxkLXHBJqrM6JZrY0UAPOzKyA8=; b=ZWswtpVDdhegjoenV+DKtYun7cCboO0n4EGdL8DPE6NeM0pcywRSyUAGbzhC6Bp5kAwcrl vAz7/JQWYuQSpBol+/I66gxpOSPB+qCXpgHSNEOjxpb5Mnsc8DxGUni1OKWnprg/DbGwh3 w88d5mT5MyK856qUWObSpJKE8zUR9JZsyAnqn0Con4xhXwclchpTWIvut0QKv6yswkNldx 7Wg3RLm9L6WnXgyaqTAitoYJBvDJbN8xVoFhH70dxiib0vd3PLk5qPqXY4Qo5b1GJvEFSl nN+CjgzM/Ok1hsoVLwr7WDmmtQ4NXyBWbaq9xe3CIbVxtLiv4/JkVbkJF/7NLw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1726782209; a=rsa-sha256; cv=none; b=aqFkDRVC8TOHbNTPZ69sEGZbPs40JEd1VcoSeaAz69PgpOsUmIXOZLxvKr5rThicVIUtCM EuvBitI3YAZrlOGsNzkUafixBtGSIE37pBJaloD80VwWrsfEbVTE6IW75AgK17oRIG/ov5 Q165+v3F+w4zd5GyL/P0v8CF09mF+S7WSa8IensKsCELyD1sa3eSVocqp2V+/FtiONHGQ6 GjQ+xVMidYs4LyFEmPunTqbAV5+SWEVwmRFt/HNKKIYTHYIuudZQk1fsFjyx5yVn/PfyRi 8f1KTuZKVnciy2xjL8Y6LEOKi3y+5483W28D9uhoS5gOd5oj5/RtpFNTpDjlmw== 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=1726782209; 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=xtm2i8PFr6vMDRxJzAxkLXHBJqrM6JZrY0UAPOzKyA8=; b=AY2pjESB994BLZeFy1B3Yd5OG70cGC/3jVjz0OkxbqoKpUA6u7z2woSP/a09If/1gAJfKM LT7u8VP6ZKCMvMwVXRQRs6BWZHTBQljkaFPQmU4lIMJTmbUt3sQyRv/jRJpbfRBxTQHL3D tM64VQvXo3ENOJCD1Aixr7dwwYt/8swyyu/r1AqJPsy6xBtwU5yCWYO5iSbYKt5bqS4Jh/ ZYTvWHKXQePq0Ny+UjmT+AbACUdZa+0WIBksZZRCeEKJHDfShvpgpcXLnszq1rCg6k72XV cvZQkHxTa926Se4t+Rxx5R68ZbddSyXf5anvrOYh4gv9fxoqcxGCbJfNRCoLgg== 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 4X8pt95ymrzMYW; Thu, 19 Sep 2024 21:43:29 +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 48JLhTZX089182; Thu, 19 Sep 2024 21:43:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48JLhTmM089179; Thu, 19 Sep 2024 21:43:29 GMT (envelope-from git) Date: Thu, 19 Sep 2024 21:43:29 GMT Message-Id: <202409192143.48JLhTmM089179@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: b21881d8c421 - stable/14 - 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/14 X-Git-Reftype: branch X-Git-Commit: b21881d8c42132fca37f361c0baa2fd08b51f9e2 Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=b21881d8c42132fca37f361c0baa2fd08b51f9e2 commit b21881d8c42132fca37f361c0baa2fd08b51f9e2 Author: Niko Sonack AuthorDate: 2024-07-02 19:27:25 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-09-19 21:41:43 +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 8416be656f81..067feed13e92 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)) {