svn commit: r325343 - stable/11/sys/dev/usb/input

Vladimir Kondratyev wulf at FreeBSD.org
Thu Nov 2 21:13:26 UTC 2017


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;


More information about the svn-src-stable-11 mailing list