From nobody Tue Jul 02 23:17:50 2024 X-Original-To: dev-commits-src-main@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 4WDJjV6qxjz5PfHZ; Tue, 02 Jul 2024 23:17:50 +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 4WDJjV6HLSz4DYc; Tue, 2 Jul 2024 23:17:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719962270; 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=+YHkL6lkLSBx64GyFrx17XZ2MFkrFi08MyN5vVWdEnw=; b=P3DH86y6rW4Gz84W+M5L122zxOouPhIng33Bem/LRK1JOv/issRw0n172o13/7+Q6V/QOu wsyrzD4AsniSccdDgHAi1pesFvHEtSptvAVR/FAPEih4vXYS7hFm3kGlBGdbJLEIQ8vVAs OsetwH0PsMLIHDjcbgPmSW2cClX8bIJ5tSkyOHeprvDzy0jj5UUcOmD39sGlFpFeZoN4YQ nAhQKiE2XutnkOS92acdmeKDwfmKnv7Z1E2wK7vQgVAigsgShtmKAd/rHMRM3BAU2T+CF1 4UCfImApV5LaPX3OgE0XbZtVqGAKhvyQN1U/pge3AQPZfgmeZXqe8mYqzP6cUg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719962270; a=rsa-sha256; cv=none; b=iqkTAT3hi13OuC2H71wNLXCX8xnDiJA3UIOI6EcQEfnyzFf3GnM00EML36cQRbYDBv8aMn faZUeqKglzLdgNLRwqhc/PO+om/Pnwlf4GPuYxDwAa3Csz3iuG0yHJGS006duWSzMGypCD Qm/kzCqF7d+KfAE5UzMXg4LWi+n5YyZX1SFOxeLlFrluvrAdx0fe0CZKZmgU3Rxz/5MfBO EmUox2bcxFUTjSKWpTf8+4mgcrLk938VE57TVFtXngOfBPEvMm1K4RGqr2tn+Lo3Y5zIak 6eaC5ZvXHPpRwsqJQhT+O55FZs2Y9673tRqCO0383vSNGbSRVa7oMXOIRN34Lw== 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=1719962270; 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=+YHkL6lkLSBx64GyFrx17XZ2MFkrFi08MyN5vVWdEnw=; b=SZvb/WvH/qz4o6GDBI9Yu9liylvY37YHdVZKSMOX10hB3m37x4HcEhv23nOcev2W8gFpK0 oVxpjswHqPEUZyH77pGDnviLPLbSdKqb0re5da1N9YvhcYMb0vX2xxyB++u85DGgzjd6+l 994krK6Ftju3hMAf0tl7C00phBNoAvwjqxb9vje30hAcQL/7GtWPc5yITS45TXqO4gua4y iai9uNqoEfWA2TuAPiFapx5CrWkgxYqYNsOhlPUD27jVz6YsSGXJcVeDiub/+NhpVP8XWe 5L7JWhg49noRLVZjVN3t+ebkUYfUnVR8cEf9rP0tmkPAOt8jwENVDREPSFeq/g== 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 4WDJjV5m1bz16ky; Tue, 2 Jul 2024 23:17:50 +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 462NHoYm019554; Tue, 2 Jul 2024 23:17:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 462NHogY019551; Tue, 2 Jul 2024 23:17:50 GMT (envelope-from git) Date: Tue, 2 Jul 2024 23:17:50 GMT Message-Id: <202407022317.462NHogY019551@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: d6888e211b07 - main - ums(4): fix incorrect mouse button reporting via evdev List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: d6888e211b07be79dd8de3145ac41b365f482ae8 Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=d6888e211b07be79dd8de3145ac41b365f482ae8 commit d6888e211b07be79dd8de3145ac41b365f482ae8 Author: Niko Sonack AuthorDate: 2024-07-02 19:27:25 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-07-02 23:15:50 +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 --- 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)) {