usb/83353: [patch] ums driver limits number of buttons to 7
Seán Farley
sean-freebsd at farley.org
Tue Jul 12 21:30:18 GMT 2005
>Number: 83353
>Category: usb
>Synopsis: [patch] ums driver limits number of buttons to 7
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-usb
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Tue Jul 12 21:30:16 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: Seán Farley
>Release: FreeBSD 5.4-STABLE i386
>Organization:
>Environment:
System: FreeBSD thor.farley.org 5.4-STABLE FreeBSD 5.4-STABLE #0: Thu Jun 23 09:55:25 CDT 2005 root at thor.farley.org:/usr/obj/usr/src/sys/THOR i386
>Description:
The Logitech MX1000 is registered with the ums driver as only having
seven buttons when it has at least twelve.
I tried using the psm driver, but it claimed a maximum of seven buttons
while this mouse has twelve according to one source[1]. I then tried
the ums driver, yet it also claimed only seven buttons. Fortunately, I
found a NetBSD PR (kern/30248 [2]) concerning the button limit in the
ums driver. Since sc_buttons is an int, I just bumped up MAX_BUTTONS to
31, and the driver found 16 buttons. I have no idea where the extra
four buttons are coming from.
More details in my e-mail to freebsd-hackers:
http://lists.freebsd.org/pipermail/freebsd-hackers/2005-July/012652.html
1. http://floam.sh.nu/index.xhtml?page=guides§ion=mx1000
2. http://www.netbsd.org/cgi-bin/query-pr-single.pl?number=30248
>How-To-Repeat:
>Fix:
sc_buttons is actually an int. Should it be an unsigned int?
------------- Begin Patch --------------------------
--- sys/dev/usb/ums.c.orig Mon Jul 11 23:16:37 2005
+++ sys/dev/usb/ums.c Mon Jul 11 23:16:37 2005
@@ -116,7 +116,7 @@
#define UMS_T 0x02 /* aa direction available (tilt) */
#define UMS_SPUR_BUT_UP 0x02 /* spurious button up events */
int nbuttons;
-#define MAX_BUTTONS 7 /* chosen because sc_buttons is u_char */
+#define MAX_BUTTONS 31 /* chosen because sc_buttons is u_char */
u_char qbuf[QUEUE_BUFSIZE]; /* must be divisable by 3&4 */
u_char dummy[100]; /* XXX just for safety and for now */
------------- End Patch ----------------------------
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-usb
mailing list