From nobody@www.freebsd.org  Wed May 29 22:33:13 2002
Return-Path: <nobody@www.freebsd.org>
Received: from nwww.freebsd.org (www.FreeBSD.org [216.136.204.117])
	by hub.freebsd.org (Postfix) with ESMTP id 2B4E837B404
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 29 May 2002 22:33:13 -0700 (PDT)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by nwww.freebsd.org (8.12.2/8.12.2) with ESMTP id g4U5XChG069192
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 29 May 2002 22:33:12 -0700 (PDT)
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.2/8.12.2/Submit) id g4U5XCmN069191;
	Wed, 29 May 2002 22:33:12 -0700 (PDT)
Message-Id: <200205300533.g4U5XCmN069191@www.freebsd.org>
Date: Wed, 29 May 2002 22:33:12 -0700 (PDT)
From: Simon Walton <simonw@lucent.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Memorex scrollpro mouse is not fully functional
X-Send-Pr-Version: www-1.0

>Number:         38730
>Category:       kern
>Synopsis:       Memorex scrollpro mouse is not fully functional
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    philip
>State:          suspended
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed May 29 22:40:01 PDT 2002
>Closed-Date:    
>Last-Modified:  Sat Mar 01 20:05:05 UTC 2008
>Originator:     Simon Walton
>Release:        4.2
>Organization:
>Environment:
FreeBSD stepney 4.2-RELEASE FreeBSD 4.2-RELEASE #15: Wed May 29 22:13:30 PDT 2002     simonw@stepney:/usr/src/sys/compile/STEPNEY  i386     
>Description:
The Memorex scroll pro RF mouse has five buttons (including the
wheel). It is IntelliMouse compatible, but if it attaches as
an IntelliMouse the two extra buttons are disabled.
It can be recognized using the same control sequence as
the 4D mouse, and if attached in this way the extra buttons
will be recognized. The patch below achieves this.	

>How-To-Repeat:
Plug in the mouse. Boot up with X-windows. Try using the side
buttons.
>Fix:
This patch to the psm driver enables the buttons:

*** isa/psm.c.orig      Mon May 27 00:10:06 2002
--- isa/psm.c   Wed May 29 22:21:36 2002
***************
*** 253,258 ****
--- 253,259 ----
  static probefunc_t enable_gmouse;
  static probefunc_t enable_aglide; 
  static probefunc_t enable_kmouse;
+ static probefunc_t enable_scrollpro;
  static probefunc_t enable_msexplorer;
  static probefunc_t enable_msintelli;
  static probefunc_t enable_4dmouse;
***************
*** 283,288 ****
--- 284,291 ----
        0x08, MOUSE_4D_PACKETSIZE, enable_4dmouse, },
      { MOUSE_MODEL_4DPLUS,             /* A4 Tech 4D+ Mouse */
        0xc8, MOUSE_4DPLUS_PACKETSIZE, enable_4dplus, },
+     { MOUSE_MODEL_INTELLI,            /* Memorex ScrollPro */
+       0x08, MOUSE_PS2INTELLI_PACKETSIZE, enable_scrollpro, },
      { MOUSE_MODEL_INTELLI,            /* Microsoft IntelliMouse */
        0x08, MOUSE_PS2INTELLI_PACKETSIZE, enable_msintelli, },
      { MOUSE_MODEL_GLIDEPOINT,         /* ALPS GlidePoint */
***************
*** 2551,2556 ****
--- 2554,2587 ----
  
      sc->hw.hwid = id;
      sc->hw.buttons = 3;
+ 
+     return TRUE;
+ }
+ 
+ static int
+ enable_scrollpro(struct psm_softc *sc)
+ {
+     /*
+      * Intellimouse compatible, but with five buttons
+      */
+ 
+     int id;
+     KBDC kbdc = sc->kbdc;
+ /*
+  * enable_4dmouse() has already sent the id sequence...
+  */
+     id = get_aux_id(kbdc);
+     /*
+      * Memorex Scroll Pro: 5
+      * WinEasy 4D: 6
+      * Cable-Free 4D: 8 (4DPLUS)
+      * 4 Way ScrollMouse 4D+: 8 (4DPLUS)
+      */
+     if (id != 5)
+       return FALSE;
+ 
+     sc->hw.hwid = PSM_INTELLI_ID;
+     sc->hw.buttons = 5;
  
      return TRUE;
  }

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->mikeh 
Responsible-Changed-By: mikeh 
Responsible-Changed-When: Tue Jul 1 09:23:16 PDT 2003 
Responsible-Changed-Why:  
I'll look at this. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=38730 
State-Changed-From-To: open->closed 
State-Changed-By: mikeh 
State-Changed-When: Thu Mar 11 06:27:00 PST 2004 
State-Changed-Why:  
Release this back into the pool until I have more time to look at it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=38730 
State-Changed-From-To: closed->open 
State-Changed-By: mikeh 
State-Changed-When: Thu Mar 11 06:30:44 PST 2004 
State-Changed-Why:  
Reassign not close. 


Responsible-Changed-From-To: mikeh->freebsd-bugs 
Responsible-Changed-By: mikeh 
Responsible-Changed-When: Thu Mar 11 06:30:44 PST 2004 
Responsible-Changed-Why:  
Reassign not close. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=38730 
State-Changed-From-To: open->feedback 
State-Changed-By: philip 
State-Changed-When: Mon Jan 10 15:02:04 GMT 2005 
State-Changed-Why:  
This is your patch updated for the current state of -current. 
Does this work for you? 

Thanks! 

Index: psm.c 
=================================================================== 
RCS file: /home/philip/projects/freebsd/FreeBSD-CVS/src/sys/isa/psm.c,v 
retrieving revision 1.84 
diff -u -r1.84 psm.c 
--- psm.c       10 Jan 2005 13:05:58 -0000      1.84 
+++ psm.c       10 Jan 2005 15:05:23 -0000 
@@ -327,6 +327,7 @@ 
static probefunc_t enable_4dmouse; 
static probefunc_t enable_4dplus; 
static probefunc_t enable_mmanplus; 
+static probefunc_t enable_scrollpro; 
static probefunc_t enable_synaptics; 
static probefunc_t enable_versapad; 
static int tame_mouse(struct psm_softc *, packetbuf_t *, mousestatus_t *, unsigned char *); 
@@ -353,6 +354,8 @@ 
0x08, MOUSE_4D_PACKETSIZE, enable_4dmouse, }, 
{ MOUSE_MODEL_4DPLUS,              /* A4 Tech 4D+ Mouse */ 
0xc8, MOUSE_4DPLUS_PACKETSIZE, enable_4dplus, }, 
+    { MOUSE_MODEL_SCROLLPRO,           /* Memorex ScrollPro */ 
+      0x08, MOUSE_PS2INTELLI_PACKETSIZE, enable_scrollpro, }, 
{ MOUSE_MODEL_INTELLI,             /* Microsoft IntelliMouse */ 
0x08, MOUSE_PS2INTELLI_PACKETSIZE, enable_msintelli, }, 
{ MOUSE_MODEL_GLIDEPOINT,          /* ALPS GlidePoint */ 
@@ -3237,6 +3240,29 @@ 
return TRUE; 
} 

+/* Memorex ScrollPro */ 
+static int 
+enable_scrollpro(struct psm_softc *sc) 
+{ 
+    /* 
+     * IntelliMouse compatible, but with five buttons 
+     */ 
+ 
+    int id; 
+    KBDC kbdc = sc->kbdc; 
+ 
+    /* enable_4dmouse() has already sent the id sequence */ 
+    id = get_aux_id(kbdc); 
+ 
+    if (id != 5) 
+       return (FALSE); 
+ 
+    sc->hw.hwid = PSM_INTELLI_ID; 
+    sc->hw.buttons = 5; 
+ 
+    return (TRUE); 
+} 
+ 
/* Synaptics Touchpad */ 
static int 
enable_synaptics(struct psm_softc *sc) 



Responsible-Changed-From-To: freebsd-bugs->philip 
Responsible-Changed-By: philip 
Responsible-Changed-When: Mon Jan 10 15:02:04 GMT 2005 
Responsible-Changed-Why:  
Grabbing mouse-related PRs. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=38730 
State-Changed-From-To: feedback->suspended 
State-Changed-By: linimon 
State-Changed-When: Sat Mar 1 20:04:25 UTC 2008 
State-Changed-Why:  
No feedback was received.  OTOH this does not sound like it is currently 
being worked on. 

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