Subject: kern/19445: Griffin Powermate is better off on ugen than uhid
To: None <gnats-bugs@gnats.netbsd.org>
From: seebs <seebs@vash.cel.plethora.net>
List: netbsd-bugs
Date: 12/18/2002 13:54:52
>Number:         19445
>Category:       kern
>Synopsis:       Griffin Powermate device is less functional as a mouse.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 18 13:55:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     seebs
>Release:        NetBSD 1.6K
>Organization:
>Environment:
System: NetBSD vash.cel.plethora.net 1.6K NetBSD 1.6K (VASH) #0: Wed Dec 18 10:42:37 CST 2002 seebs@vash.cel.plethora.net:/usr/src/sys/arch/i386/compile/VASH i386
Architecture: i386
Machine: i386
>Description:
	The Griffin Powermate is a small gizmo which provides a button, knob,
	and tweakable LED light.  There is a published interface for talking
	to these, and a userland program can talk to it through /dev/ugen?.

	However, if our ugen driver doesn't configure it, it will respond
	to the probe for uhid, and become a one-button mouse with only X, not
	Y, movement.  This is useless.

>How-To-Repeat:
	Hook up a Powermate.

>Fix:
	Add this line to GENERIC:
	ugen*   at uhub? vendor 0x077d product 0x0410

	And remove the #if 0 in ugen.c that prevents matches like this from
	working:

Index: ugen.c
===================================================================
RCS file: /cvsroot/syssrc/sys/dev/usb/ugen.c,v
retrieving revision 1.63
diff -c -r1.63 ugen.c
*** ugen.c	2002/11/26 18:49:48	1.63
--- ugen.c	2002/12/18 21:53:46
***************
*** 189,198 ****
  {
  	USB_MATCH_START(ugen, uaa);
  
- #if 0
  	if (uaa->matchlvl)
  		return (uaa->matchlvl);
- #endif
  	if (uaa->usegeneric)
  		return (UMATCH_GENERIC);
  	else
--- 189,196 ----

	Note that this latter change is almost certainly a good idea whether
	or not we add the line for the powermate to GENERIC; someone who
	doesn't know it's there has no way of knowing why his attempt to
	probe a device with ugen is failing.

>Release-Note:
>Audit-Trail:
>Unformatted: