Subject: kern/7854: USB mouse driver maps Z axis reverted
To: None <gnats-bugs@gnats.netbsd.org>
From: Matthias Scheler <tron@lyssa.owl.de>
List: netbsd-bugs
Date: 06/25/1999 11:05:46
>Number:         7854
>Category:       kern
>Synopsis:       USB mouse driver maps Z axis reverted
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jun 25 11:05:00 1999
>Last-Modified:
>Originator:     Matthias Scheler
>Organization:
Matthias Scheler                                http://home.owl.de/~tron/
>Release:        990624
>Environment:
System: NetBSD lyssa.owl.de 1.4D NetBSD 1.4D (LYSSA) #1: Fri Jun 25 19:33:57 CEST 1999 tron@lyssa.owl.de:/src/sys/compile/LYSSA i386


>Description:
The USB mouse driver maps the Z axis of an USB wheel mouse right oposite
to the PS/2 driver. Because the PS/2 driver uses the same mapping as
XFree86's PS/2 driver the USB driver should be changed.

>How-To-Repeat:
Try to use well known XFree86 configuration "ZAxisMapping 4 5" with an
USB wheel mouse.

>Fix:
Index: ums.c
===================================================================
RCS file: /cvsroot/syssrc/sys/dev/usb/ums.c,v
retrieving revision 1.23
diff -u -r1.23 ums.c
--- ums.c       1999/05/09 15:10:31     1.23
+++ ums.c       1999/06/25 17:47:22
@@ -439,7 +439,7 @@
        }
        dx =  hid_get_data(ibuf, &sc->sc_loc_x);
        dy = -hid_get_data(ibuf, &sc->sc_loc_y);
-       dz =  hid_get_data(ibuf, &sc->sc_loc_z);
+       dz = -hid_get_data(ibuf, &sc->sc_loc_z);
        for (i = 0; i < sc->nbuttons; i++)
                if (hid_get_data(ibuf, &sc->sc_loc_btn[i]))
                        buttons |= (1 << UMS_BUT(i));
>Audit-Trail:
>Unformatted: