From owner-svn-src-stable-11@freebsd.org Thu Nov 2 21:13:26 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3F1ADE63264; Thu, 2 Nov 2017 21:13:26 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0B12169CFA; Thu, 2 Nov 2017 21:13:25 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vA2LDPHp055476; Thu, 2 Nov 2017 21:13:25 GMT (envelope-from wulf@FreeBSD.org) Received: (from wulf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vA2LDPFX055475; Thu, 2 Nov 2017 21:13:25 GMT (envelope-from wulf@FreeBSD.org) Message-Id: <201711022113.vA2LDPFX055475@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wulf set sender to wulf@FreeBSD.org using -f From: Vladimir Kondratyev Date: Thu, 2 Nov 2017 21:13:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r325343 - stable/11/sys/dev/usb/input X-SVN-Group: stable-11 X-SVN-Commit-Author: wulf X-SVN-Commit-Paths: stable/11/sys/dev/usb/input X-SVN-Commit-Revision: 325343 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Nov 2017 21:13:26 -0000 Author: wulf Date: Thu Nov 2 21:13:24 2017 New Revision: 325343 URL: https://svnweb.freebsd.org/changeset/base/325343 Log: MFC: r324772 ums(4): Unreverse evdev Tilt-axis reporting to match Linux. sysmouse tilt to button mapping remained unchanged. Reviewed by: hselasky Approved by: gonzo (mentor) Differential Revision: https://reviews.freebsd.org/D12671 Modified: stable/11/sys/dev/usb/input/ums.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/usb/input/ums.c ============================================================================== --- stable/11/sys/dev/usb/input/ums.c Thu Nov 2 20:45:04 2017 (r325342) +++ stable/11/sys/dev/usb/input/ums.c Thu Nov 2 21:13:24 2017 (r325343) @@ -296,7 +296,7 @@ ums_intr_callback(struct usb_xfer *xfer, usb_error_t e if ((info->sc_flags & UMS_FLAG_T_AXIS) && (id == info->sc_iid_t)) { - dt -= hid_get_data(buf, len, &info->sc_loc_t); + dt += hid_get_data(buf, len, &info->sc_loc_t); /* T-axis is translated into button presses */ buttons_found |= (1UL << 5) | (1UL << 6); } @@ -332,10 +332,10 @@ ums_intr_callback(struct usb_xfer *xfer, usb_error_t e /* translate T-axis into button presses until further */ if (dt > 0) { ums_put_queue(sc, 0, 0, 0, 0, buttons); - buttons |= 1UL << 5; + buttons |= 1UL << 6; } else if (dt < 0) { ums_put_queue(sc, 0, 0, 0, 0, buttons); - buttons |= 1UL << 6; + buttons |= 1UL << 5; } sc->sc_status.button = buttons;