From nobody@FreeBSD.org  Tue Apr 29 17:50:04 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 98AE41065670
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 29 Apr 2008 17:50:04 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 861E48FC1E
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 29 Apr 2008 17:50:04 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m3THnQd9045109
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 29 Apr 2008 17:49:26 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id m3THnQBt045108;
	Tue, 29 Apr 2008 17:49:26 GMT
	(envelope-from nobody)
Message-Id: <200804291749.m3THnQBt045108@www.freebsd.org>
Date: Tue, 29 Apr 2008 17:49:26 GMT
From: Brian Cox <coxbrian@msu.edu>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Scroll wheel breakage w/ USB MS Wireless Intellimouse Explorer 2.0
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         123224
>Category:       kern
>Synopsis:       [ums] Scroll wheel breakage w/ USB MS Wireless Intellimouse Explorer 2.0
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-usb
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Apr 29 18:00:01 UTC 2008
>Closed-Date:    Sat Aug 23 18:51:22 UTC 2008
>Last-Modified:  Sat Aug 23 18:51:22 UTC 2008
>Originator:     Brian Cox
>Release:        RELENG_7
>Organization:
>Environment:
FreeBSD lina 7.0-STABLE FreeBSD 7.0-STABLE #1: Tue Apr 29 06:57:28 EDT 2008     toor@lina:/usr/obj/usr/src/sys/LINA  i386

>Description:
I've observed what appears to be a regression in the NetBSD rev 1.63 code patched into sys/dev/usb/ums.c.  Judging by what I see in CVSWeb, it probably affects -CURRENT as well as RELENG_6 and RELENG_7 (the latter two of which I can confirm).  The patch in question was applied in revs 1.97, 1.96.2.2, and 1.77.2.6 for -CURRENT, RELENG_7 and RELENG_6, respectively.

I originally installed 7.0-RELEASE on my system, and the scroll wheel on my usb MS Wireless Intellimouse Explorer 2.0 was working fine.  It suddenly stopped working (via /dev/sysmouse or /dev/ums0, it doesn't matter which one) when I downgraded from 7.0-RELEASE to the latest RELENG_6 a couple of weeks ago for an unrelated issue.  At the time I thought it was just a problem with 6.3, but when I re-upgraded to RELENG_7 recently the problem persisted.

When I used the "xev" program in xorg, it didn't even detect any events when I rolled the scroll wheel, but it detected button events for the other buttons and the scroll wheel when pushed down as a normal button (as opposed to rolling it).

Here's the relevant line in dmesg:

Apr 18 21:07:05 lina kernel: ums0: Microsoft Microsoft Wireless Optical Mouse
<AE> 1.0A, rev 2.00/0.56, addr 2, iclass 3/1
Apr 18 21:07:05 lina kernel: ums0: 5 buttons and a TILT dir.

>How-To-Repeat:
Use the latest RELENG_6 or RELENG_7 (or, most probably, -CURRENT) and attach a USB-based wireless Microsoft Intellimouse Explorer 2.0 to your system.  Attempt to use the scroll wheel in an application (like an xorg xterm) that should normally respond to the scroll wheel.
>Fix:
I copied rev 1.96 of ums.c into my local source tree, leaving everything else at the latest RELENG_7, and rebuilt the kernel.  The scroll wheel now works as I can vertically scroll windows in xorg using the wheel and xev is now reporting button 4 and 5 events when I roll the wheel. The information the kernel prints out via dmesg also changed:

ums0: <Microsoft Microsoft Wireless Optical Mouse\M-. 1.0A, class 0/0, rev 2.00/
0.56, addr 2> on uhub0
ums0: 5 buttons and Z dir and a TILT dir.

Please note the addition of "and Z dir".

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-usb 
Responsible-Changed-By: vwe 
Responsible-Changed-When: Tue Apr 29 20:48:44 UTC 2008 
Responsible-Changed-Why:  

Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=123224 

From: Kai Wang <kaiwang27@gmail.com>
To: bug-followup@FreeBSD.org, coxbrian@msu.edu
Cc:  
Subject: Re: kern/123224: [ums] Scroll wheel breakage w/ USB MS Wireless
	Intellimouse Explorer
Date: Mon, 11 Aug 2008 16:10:55 +0200

 Hi Brian,
 
 I think the regression you metioned is indeed there.
 
 Could you please try the following patch against -CURRENT or -STABLE
 and see if it fixes the problem?
 
 --- /sys/dev/usb/ums.c	2008-05-05 20:25:42.000000000 +0200
 +++ ums.c.new	2008-08-11 15:00:37.000000000 +0200
 @@ -283,6 +283,9 @@
  	/* Try the wheel first as the Z activator since it's tradition. */
  	wheel = hid_locate(desc, size, HID_USAGE2(HUP_GENERIC_DESKTOP,
  						  HUG_WHEEL),
 +			    hid_input, &sc->sc_loc_z, &flags) ||
 +		hid_locate(desc, size, HID_USAGE2(HUP_GENERIC_DESKTOP,
 +						  HUG_TWHEEL),
  			    hid_input, &sc->sc_loc_z, &flags);
  
  	if (wheel) {

From: Brian Cox <coxbrian@msu.edu>
To: Kai Wang <kaiwang27@gmail.com>
Cc: bug-followup@freebsd.org
Subject: Re: kern/123224: [ums] Scroll wheel breakage w/ USB MS Wireless Intellimouse Explorer
Date: Mon, 18 Aug 2008 02:42:39 -0400

 On Monday 11 August 2008 10:10:55 am Kai Wang wrote:
 > I think the regression you metioned is indeed there.
 >
 > Could you please try the following patch against -CURRENT or -STABLE
 > and see if it fixes the problem?
 
 I applied the patch against the latest RELENG_6 (as of approx. 18 Aug 2008 
 02:00 -0400).  The kernel now detects the Z dir and scrolling with the wheel 
 works.
 
 - Brian

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/123224: commit references a PR
Date: Mon, 18 Aug 2008 16:29:35 +0000 (UTC)

 kaiw        2008-08-18 16:29:13 UTC
 
   FreeBSD src repository
 
   Modified files:
     sys/dev/usb          ums.c 
   Log:
   SVN rev 181839 on 2008-08-18 16:29:13Z by kaiw
   
   Re-add Microsoft Intellimouse 2.0 TWHEEL quirk.
   
   Tested by:      Merritt Draney, Brian Cox
   PR:             kern/123224
   PR:             kern/123510
   MFC after:      3 days
   
   Revision  Changes    Path
   1.100     +3 -0      src/sys/dev/usb/ums.c
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/123224: commit references a PR
Date: Sat, 23 Aug 2008 17:33:13 +0000 (UTC)

 kaiw        2008-08-23 17:32:43 UTC
 
   FreeBSD src repository
 
   Modified files:        (Branch: RELENG_7)
     sys/dev/usb          ums.c 
   Log:
   SVN rev 182072 on 2008-08-23 17:32:43Z by kaiw
   
   MFC r181839:
   
   Re-add Microsoft Intellimouse 2.0 TWHEEL quirk.
   
   Tested by:      Merritt Draney, Brian Cox
   PR:             kern/123224
   PR:             kern/123510
   
   Revision  Changes    Path
   1.96.2.4  +3 -0      src/sys/dev/usb/ums.c
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->closed 
State-Changed-By: kaiw 
State-Changed-When: Sat Aug 23 18:50:55 UTC 2008 
State-Changed-Why:  


Patched. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=123224 
>Unformatted:
