Author: branden
Date: 2004-08-11 00:16:09 -0500 (Wed, 11 Aug 2004)
New Revision: 1727

Added:
   trunk/debian/patches/000_stolen_from_HEAD_mouse_driver.diff
Modified:
   trunk/debian/CHANGESETS
   trunk/debian/changelog
   trunk/debian/patches/040_extend_netmouse_support.diff
   trunk/debian/patches/097_mouse_zaxis_mapping_pushes_up_buttons.diff
   trunk/debian/xserver-xfree86.config.in
Log:
Grab from XFree86 CVS (2003-10-02) several updates to the mouse input
driver, fixing bugs and adding support for the Kensington
"ValuMouseScroll" protocol.  Grab an additional fix from XFree86 CVS
(2003-12-08) for mouse wheel misbehavior on PowerPC.  Resync patches #040
and #097.  Add "ValuMouseScroll" to the list of supported serial mouse
protocols in xserver-xfree86's configuration script.


Modified: trunk/debian/CHANGESETS
===================================================================
--- trunk/debian/CHANGESETS     2004-08-11 04:56:07 UTC (rev 1726)
+++ trunk/debian/CHANGESETS     2004-08-11 05:16:09 UTC (rev 1727)
@@ -296,4 +296,12 @@
 dh_installdebconf (thanks, Guillem Jover).
     1726
 
+Grab from XFree86 CVS (2003-10-02) several updates to the mouse input
+driver, fixing bugs and adding support for the Kensington
+"ValuMouseScroll" protocol.  Grab an additional fix from XFree86 CVS
+(2003-12-08) for mouse wheel misbehavior on PowerPC.  Resync patches #040
+and #097.  Add "ValuMouseScroll" to the list of supported serial mouse
+protocols in xserver-xfree86's configuration script.
+    1727
+
 vim:set ai et sts=4 sw=4 tw=80:

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog      2004-08-11 04:56:07 UTC (rev 1726)
+++ trunk/debian/changelog      2004-08-11 05:16:09 UTC (rev 1727)
@@ -215,6 +215,13 @@
     8859-15, shutting up hateful noise from one of the programs called by
     dh_installdebconf (thanks, Guillem Jover).
 
+  * Grab from XFree86 CVS (2003-10-02) several updates to the mouse input
+    driver, fixing bugs and adding support for the Kensington
+    "ValuMouseScroll" protocol.  Grab an additional fix from XFree86 CVS
+    (2003-12-08) for mouse wheel misbehavior on PowerPC.  Resync patches #040
+    and #097.  Add "ValuMouseScroll" to the list of supported serial mouse
+    protocols in xserver-xfree86's configuration script.
+
   Changes by Fabio M. Di Nitto and Branden Robinson:
 
   * Support building only the parts of the source tree needed by
@@ -255,7 +262,7 @@
   * Add checks to NSERVERS and NDRIVERS to avoid an "unknown" card to be
     counted as a supported one if the user choose to autodetected.
 
- -- Branden Robinson <[EMAIL PROTECTED]>  Tue, 10 Aug 2004 23:49:04 -0500
+ -- Branden Robinson <[EMAIL PROTECTED]>  Wed, 11 Aug 2004 00:07:34 -0500
 
 xfree86 (4.3.0.dfsg.1-6) unstable; urgency=low
 

Added: trunk/debian/patches/000_stolen_from_HEAD_mouse_driver.diff
===================================================================
--- trunk/debian/patches/000_stolen_from_HEAD_mouse_driver.diff 2004-08-11 
04:56:07 UTC (rev 1726)
+++ trunk/debian/patches/000_stolen_from_HEAD_mouse_driver.diff 2004-08-11 
05:16:09 UTC (rev 1727)
@@ -0,0 +1,438 @@
+$Id$
+
+xc/programs/Xserver/hw/xfree86/input/mouse/mouse.c @ 1.70
+    32. Fix drag lock when using a mouse button greater than 4
+        (Bugzilla #51, Paul Elliott)
+[Alan Hourihane]
+
+xc/programs/Xserver/hw/xfree86/input/mouse/mouse.c @ 1.71
+xc/programs/Xserver/hw/xfree86/input/mouse/mouse.h @ 1.12
+xc/programs/Xserver/hw/xfree86/input/mouse/mouse.man @ 1.6
+    48. Add support for Kensington's "ValuMouse" to the mouse driver (#A.1494,
+        Roy Wood).
+[David Dawes]
+
+xc/programs/Xserver/hw/xfree86/input/mouse/mouse.c @ 1.72
+    55. Make the mouse driver check the SendDragEvents option (based on 
#A.1682,
+        Juuso Ã…berg).
+[David Dawes]
+
+xc/programs/Xserver/hw/xfree86/input/mouse/mouse.c @ 1.73
+xc/programs/Xserver/hw/xfree86/input/mouse/mousePriv.h @ 1.9
+xc/programs/Xserver/hw/xfree86/input/mouse/pnp.c @ 1.17
+    81. Reduced retry count for mouse configuration to 4. This should speed
+        up server start for people who use a mouse repeater like gpm
+        (Egbert Eich).
+
+xc/programs/Xserver/hw/xfree86/input/mouse/mouse.man @ 1.7
+[...]
+  Fix manual pages typos (Bugzilla #316, Jens Schweikhardt).
+[Matthieu Herrb]
+
+xc/programs/Xserver/hw/xfree86/input/mouse/pnp.c @ 1.18
+[...]
+[Fix misnumbered protocol for PROT_EXPPS2; Egbert Eich.]
+
+xc/programs/Xserver/hw/xfree86/input/mouse/mouse.c @ 1.74
+   288. Changing PS/2 mouse resolution to 8 counts/mm as some broken mice have
+        problems with other values (W. uses 8) (Egbert Eich).
+
+xc/programs/Xserver/hw/xfree86/input/mouse/mouse.c @ 1.75
+xc/programs/Xserver/hw/xfree86/input/mouse/mousePriv.h @ 1.10
+xc/programs/Xserver/hw/xfree86/input/mouse/pnp.c @ 1.19
+[Add some #ifdef'ed out debugging code to the mouse driver; Egbert Eich.]
+
+xc/programs/Xserver/hw/xfree86/input/mouse/mouse.c @ 1.76
+   445. Fix IMPS/2 mouse wheel on platforms where char defaults to unsigned
+        (Rene Rebe).
+[David Dawes]
+
+xc/programs/Xserver/hw/xfree86/input/mouse/pnp.c @ 1.20
+[...]
+   453. Add gcc format checking for the X server's message and logging
+        functions, and fix lots of associated warnings (David Dawes).
+
+xc/programs/Xserver/hw/xfree86/input/mouse/mouse.c @ 1.77
+   461. Changing ImPS/2 mouse Z-axis range to -8 to 7 (Bugzilla #691,
+        Matthew W. S. Bell, Egbert Eich).
+
+xc/programs/Xserver/hw/xfree86/input/mouse/mouse.c @ 1.80
+   657. Fix mouse wheel code again for PowerPC (#5990, Rene Rebe).
+[David Dawes]
+
+--- xc/programs/Xserver/hw/xfree86/input/mouse/mouse.c~        2004-08-10 
20:40:22.000000000 -0500
++++ xc/programs/Xserver/hw/xfree86/input/mouse/mouse.c 2004-08-10 
20:40:42.000000000 -0500
+@@ -1,4 +1,4 @@
+-/* $XFree86: xc/programs/Xserver/hw/xfree86/input/mouse/mouse.c,v 1.69 
2003/02/11 03:33:06 dawes Exp $ */
++/* $XFree86: xc/programs/Xserver/hw/xfree86/input/mouse/mouse.c,v 1.77 
2003/10/02 13:30:01 eich Exp $ */
+ /*
+  *
+  * Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany.
+@@ -241,6 +241,8 @@
+     { -1,                     NULL,             OPTV_NONE,    {0}, FALSE }
+ };
+ 
++#define RETRY_COUNT 4
++
+ /*
+  * Microsoft (all serial models), Logitech MouseMan, First Mouse, etc,
+  * ALPS GlidePoint, Thinking Mouse.
+@@ -326,6 +328,7 @@
+     { "IntelliMouse",         MSE_SERIAL,     msDefaults,     PROT_IMSERIAL },
+     { "ThinkingMouse",                MSE_SERIAL,     msDefaults,     
PROT_THINKING },
+     { "AceCad",                       MSE_SERIAL,     acecadDefaults, 
PROT_ACECAD },
++    { "ValuMouseScroll",      MSE_SERIAL,     msDefaults,     
PROT_VALUMOUSESCROLL },
+ 
+     /* Standard PS/2 */
+     { "PS/2",                 MSE_PS2,        NULL,           PROT_PS2 },
+@@ -471,7 +474,7 @@
+               lock--;
+ 
+               /* initialize table that maps drag lock mask to target mask */
+-              pLock->nib_table[lock / NIB_SIZE][1 << (lock % NIB_BITS)] = 
++              pLock->nib_table[lock / NIB_BITS][1 << (lock % NIB_BITS)] = 
+                       targetM;
+ 
+               /* add new drag lock to mask of drag locks */
+@@ -905,6 +908,11 @@
+     pInfo->always_core_feedback = 0;
+     pInfo->conf_idev = dev;
+ 
++    /* Check if SendDragEvents has been disabled. */
++    if (!xf86SetBoolOption(dev->commonOptions, "SendDragEvents", TRUE)) {
++      pInfo->flags &= ~XI86_SEND_DRAG_EVENTS;
++    }
++
+     /* Allocate the MouseDevRec and initialise it. */
+     /*
+      * XXX This should be done by a function in the core server since the
+@@ -1049,6 +1057,11 @@
+ 
+     while ((c = XisbRead(pMse->buffer)) >= 0) {
+       u = (unsigned char)c;
++
++#if defined (EXTMOUSEDEBUG) || defined (MOUSEDATADEBUG)
++      ErrorF("mouse byte: %2.2x\n",u);
++#endif
++
+ #if 1
+       /* if we do autoprobing collect the data */
+       if (pMse->collectData && pMse->autoProbe)
+@@ -1346,14 +1359,18 @@
+                     (pBuf[0] & 0x80) >> 3;        /* button 5 */
+           dx = (pBuf[0] & 0x10) ?    pBuf[1]-256  :  pBuf[1];
+           dy = (pBuf[0] & 0x20) ?  -(pBuf[2]-256) : -pBuf[2];
+-          dz = (char)pBuf[3];
+-          if ((dz >= 7) || (dz <= -8)) {
+-              if (pMse->autoProbe && !(pBuf[3] & 0xC0)) {
++          /*
++           * The next cast must be 'signed char' for platforms (like PPC)
++           * where char defaults to unsigned.
++           */
++          dz = (signed char)(pBuf[3] | ((pBuf[3] & 0x08) ? 0xf8 : 0));
++          if ((pBuf[3] & 0xf8) && ((pBuf[3] & 0xf8) != 0xf8)) {
++              if (pMse->autoProbe) {
+                   SetMouseProto(pMse, PROT_EXPPS2);
+                   xf86Msg(X_INFO,
+                           "Mouse autoprobe: Changing protocol to %s\n",
+                           pMse->protocol); 
+-
++                  
+                   goto REDO_INTERPRET; 
+               } else  
+                   dz = 0;
+@@ -1456,12 +1473,26 @@
+           dy = - ((char)(pBuf[2]) + (char)(pBuf[4]));
+           /* FreeBSD sysmouse sends additional data bytes */
+           if (pMse->protoPara[4] >= 8) {
++              /*
++               * These casts must be 'signed char' for platforms (like PPC)
++               * where char defaults to unsigned.
++               */
+               dz = ((signed char)(pBuf[5] << 1) +
+                     (signed char)(pBuf[6] << 1)) >> 1;
+               buttons |= (int)(~pBuf[7] & 0x7f) << 3;
+           }
+           break;
+ 
++      case PROT_VALUMOUSESCROLL:      /* Kensington ValuMouseScroll */
++            buttons = ((int)(pBuf[0] & 0x20) >> 3)
++                      | ((int)(pBuf[0] & 0x10) >> 4)
++                      | ((int)(pBuf[3] & 0x10) >> 3);
++            dx = (char)(((pBuf[0] & 0x03) << 6) | (pBuf[1] & 0x3F));
++            dy = (char)(((pBuf[0] & 0x0C) << 4) | (pBuf[2] & 0x3F));
++          dz = (pBuf[3] & 0x08) ? ((int)(pBuf[3] & 0x0F) - 0x10) : 
++                                    ((int)(pBuf[3] & 0x0F));
++          break;
++
+       default: /* There's a table error */
+ #ifdef EXTMOUSEDEBUG
+           ErrorF("mouse table error\n");
+@@ -2210,6 +2241,7 @@
+   {  0x40, 0x40, 0x40, 0x00,  3,  ~0x3f, 0x00, MPF_NONE },  /* IntelliMouse */
+   {  0x40, 0x40, 0x40, 0x00,  3,  ~0x33, 0x00, MPF_NONE },  /* ThinkingMouse 
*/
+   {  0x80, 0x80, 0x80, 0x00,  3,   0x00, 0xff, MPF_NONE },  /* ACECAD */
++  {  0x40, 0x40, 0x40, 0x00,  4,   0x00, 0xff, MPF_NONE },  /* 
ValuMouseScroll */
+                                                           /* PS/2 variants */
+   {  0xc0, 0x00, 0x00, 0x00,  3,   0x00, 0xff, MPF_NONE },  /* PS/2 mouse */
+   {  0xc8, 0x08, 0x00, 0x00,  3,   0x00, 0x00, MPF_NONE },  /* genericPS/2 
mouse*/
+@@ -2370,7 +2402,7 @@
+  * Do a reset wrap mode before reset.
+  */
+ #define do_ps2Reset(x)  { \
+-    int i = 10;\
++    int i = RETRY_COUNT;\
+      while (i-- > 0) { \
+        xf86FlushInput(x->fd); \
+        if (ps2Reset(x)) break; \
+@@ -2388,7 +2420,7 @@
+     pointer options;
+     unsigned char *param = NULL;
+     int paramlen = 0;
+-    int count = 10;
++    int count = RETRY_COUNT;
+     Bool ps2Init = TRUE;
+     
+     switch (pMse->protocolID) {
+@@ -2553,7 +2585,7 @@
+       
+       case PROT_IMPS2:                /* IntelliMouse */
+       {
+-          static unsigned char seq[] = { 243, 200, 243, 100, 243, 80, 242 };
++          static unsigned char seq[] = { 243, 200, 243, 100, 243, 80 };
+           param = seq;
+           paramlen = sizeof(seq);
+       }
+@@ -2562,7 +2594,7 @@
+       case PROT_EXPPS2:               /* IntelliMouse Explorer */
+       {
+           static unsigned char seq[] = { 243, 200, 243, 100, 243, 80,
+-                                         243, 200, 243, 200, 243, 80, 242 };
++                                         243, 200, 243, 200, 243, 80 };
+       
+           param = seq;
+           paramlen = sizeof(seq);
+@@ -2572,7 +2604,7 @@
+       case PROT_NETPS2:               /* NetMouse, NetMouse Pro, Mie Mouse */
+       case PROT_NETSCPS2:             /* NetScroll */
+       {
+-          static unsigned char seq[] = { 232, 3, 230, 230, 230, };
++          static unsigned char seq[] = { 232, 3, 230, 230, 230 };
+       
+           param = seq;
+           paramlen = sizeof(seq);
+@@ -2582,7 +2614,7 @@
+       case PROT_MMPS2:                /* MouseMan+, FirstMouse+ */
+       {
+           static unsigned char seq[] = { 230, 232, 0, 232, 3, 232, 2, 232, 1,
+-                                         230, 232, 3, 232, 1, 232, 2, 232, 3, 
};
++                                         230, 232, 3, 232, 1, 232, 2, 232, 3 
};
+           param = seq;
+           paramlen = sizeof(seq);
+       }
+@@ -2592,7 +2624,7 @@
+       {
+           static unsigned char seq[] = { 243, 10, 232,  0, 243, 20, 243, 60,
+                                          243, 40, 243, 20, 243, 20, 243, 60,
+-                                         243, 40, 243, 20, 243, 20, };
++                                         243, 40, 243, 20, 243, 20 };
+           param = seq;
+           paramlen = sizeof(seq);
+       }
+@@ -2625,7 +2657,8 @@
+                   if (!count--)
+                       return TRUE;
+                   goto REDO;
+-              } 
++              }
++              ps2GetDeviceID(pInfo);
+               usleep(30000);
+               xf86FlushInput(pInfo->fd);
+           }
+@@ -2675,7 +2708,7 @@
+                   else
+                       c2[1] = 0;
+               } else {
+-                  c2[1] = 2;
++                  c2[1] = 3; /* used to be 2, W. uses 3 */
+               }
+               if (!ps2SendPacket(pInfo,c2,2)) {
+                   if (!count--)
+Index: xc/programs/Xserver/hw/xfree86/input/mouse/mouse.h
+===================================================================
+RCS file: /cvs/xc/programs/Xserver/hw/xfree86/input/mouse/mouse.h,v
+retrieving revision 1.11
+retrieving revision 1.12
+diff -u -r1.11 -r1.12
+--- xc/programs/Xserver/hw/xfree86/input/mouse/mouse.h 16 Sep 2002 18:06:07 
-0000      1.11
++++ xc/programs/Xserver/hw/xfree86/input/mouse/mouse.h 3 Apr 2003 22:18:31 
-0000       1.12
+@@ -1,4 +1,4 @@
+-/* $XFree86: xc/programs/Xserver/hw/xfree86/input/mouse/mouse.h,v 1.11 
2002/09/16 18:06:07 eich Exp $ */
++/* $XFree86: xc/programs/Xserver/hw/xfree86/input/mouse/mouse.h,v 1.12 
2003/04/03 22:18:31 dawes Exp $ */
+ 
+ /*
+  * Copyright (c) 1997-1999 by The XFree86 Project, Inc.
+@@ -21,6 +21,7 @@
+     PROT_IMSERIAL,
+     PROT_THINKING,
+     PROT_ACECAD,
++    PROT_VALUMOUSESCROLL,
+     PROT_PS2,
+     PROT_GENPS2,
+     PROT_IMPS2,
+Index: xc/programs/Xserver/hw/xfree86/input/mouse/mouse.man
+===================================================================
+RCS file: /cvs/xc/programs/Xserver/hw/xfree86/input/mouse/mouse.man,v
+retrieving revision 1.5
+retrieving revision 1.7
+diff -u -r1.5 -r1.7
+--- xc/programs/Xserver/hw/xfree86/input/mouse/mouse.man       17 Dec 2002 
20:55:21 -0000      1.5
++++ xc/programs/Xserver/hw/xfree86/input/mouse/mouse.man       29 May 2003 
21:48:10 -0000      1.7
+@@ -1,4 +1,4 @@
+-.\" $XFree86: xc/programs/Xserver/hw/xfree86/input/mouse/mouse.man,v 1.5 
2002/12/17 20:55:21 dawes Exp $ 
++.\" $XFree86: xc/programs/Xserver/hw/xfree86/input/mouse/mouse.man,v 1.7 
2003/05/29 21:48:10 herrb Exp $ 
+ .\" shorthand for double quote that works everywhere.
+ .ds q \N'34'
+ .TH MOUSE __drivermansuffix__ __vendorversion__
+@@ -55,7 +55,7 @@
+ .PP
+ .RS 12
+ Auto, Microsoft, MouseSystems, MMSeries, Logitech, MouseMan, MMHitTab,
+-GlidePoint, IntelliMouse, ThinkingMouse, AceCad, PS/2, ImPS/2,
++GlidePoint, IntelliMouse, ThinkingMouse, ValuMouseScroll, AceCad, PS/2, 
ImPS/2,
+ ExplorerPS/2, ThinkingMousePS/2, MouseManPlusPS/2, GlidePointPS/2,
+ NetMousePS/2, NetScrollPS/2, BusMouse, SysMouse, WSMouse, USB, Xqueue.
+ .RE
+@@ -192,7 +192,7 @@
+ .TP 7
+ .BI "Option \*qDragLockButtons\*q \*q" "L1 B2 L3 B4" \*q
+ Sets \*qdrag lock buttons\*q that simulate holding a button down, so
+-that low dexterity people do not have to hold a buttton down at the
++that low dexterity people do not have to hold a button down at the
+ same time they move a mouse cursor. Button numbers occur in pairs,
+ with the lock button number occurring first, followed by the button
+ number that is the target of the lock button.
+Index: xc/programs/Xserver/hw/xfree86/input/mouse/mousePriv.h
+===================================================================
+RCS file: /cvs/xc/programs/Xserver/hw/xfree86/input/mouse/mousePriv.h,v
+retrieving revision 1.8
+retrieving revision 1.10
+diff -u -r1.8 -r1.10
+--- xc/programs/Xserver/hw/xfree86/input/mouse/mousePriv.h     16 Sep 2002 
18:06:08 -0000      1.8
++++ xc/programs/Xserver/hw/xfree86/input/mouse/mousePriv.h     4 Aug 2003 
10:32:30 -0000       1.10
+@@ -1,4 +1,4 @@
+-/* $XFree86: xc/programs/Xserver/hw/xfree86/input/mouse/mousePriv.h,v 1.8 
2002/09/16 18:06:08 eich Exp $ */
++/* $XFree86: xc/programs/Xserver/hw/xfree86/input/mouse/mousePriv.h,v 1.10 
2003/08/04 10:32:30 eich Exp $ */
+ /*
+  * Copyright (c) 1997-1999 by The XFree86 Project, Inc.
+  */
+@@ -6,6 +6,11 @@
+ #ifndef _X_MOUSEPRIV_H
+ #define _X_MOUSEPRIV_H
+ 
++#if 0
++# define MOUSEINITDEBUG
++# define MOUSEDATADEBUG
++#endif
++
+ #include "mouse.h"
+ #include "xf86Xinput.h"                                                       
                                       
+ /* Private interface for the mouse driver. */
+@@ -70,5 +75,6 @@
+ Bool ps2Reset(InputInfoPtr pInfo);
+ Bool ps2EnableDataReporting(InputInfoPtr pInfo);
+ Bool ps2SendPacket(InputInfoPtr pInfo, unsigned char *bytes, int len);
++int ps2GetDeviceID(InputInfoPtr pInfo);
+ 
+ #endif /* _X_MOUSE_H */
+Index: xc/programs/Xserver/hw/xfree86/input/mouse/pnp.c
+===================================================================
+RCS file: /cvs/xc/programs/Xserver/hw/xfree86/input/mouse/pnp.c,v
+retrieving revision 1.16
+retrieving revision 1.20
+diff -u -r1.16 -r1.20
+--- xc/programs/Xserver/hw/xfree86/input/mouse/pnp.c   4 Feb 2003 15:21:18 
-0000       1.16
++++ xc/programs/Xserver/hw/xfree86/input/mouse/pnp.c   24 Sep 2003 02:43:32 
-0000      1.20
+@@ -1,4 +1,4 @@
+-/* $XFree86: xc/programs/Xserver/hw/xfree86/input/mouse/pnp.c,v 1.16 
2003/02/04 15:21:18 eich Exp $ */
++/* $XFree86: xc/programs/Xserver/hw/xfree86/input/mouse/pnp.c,v 1.20 
2003/09/24 02:43:32 dawes Exp $ */
+ /*
+  * Copyright 1998 by Kazutaka YOKOTA <[EMAIL PROTECTED]>
+  *
+@@ -35,6 +35,11 @@
+ #include "mouse.h"
+ #include "mousePriv.h"
+ 
++#ifdef MOUSEINITDEBUG
++# define DEBUG
++# define EXTMOUSEDEBUG
++#endif
++
+ /* serial PnP ID string */
+ typedef struct {
+     int revision;     /* PnP revision, 100 for 1.00 */
+@@ -473,7 +478,7 @@
+     /* checksum exists if there are any optional fields */
+     if ((id->nserial > 0) || (id->nclass > 0)
+       || (id->ncompat > 0) || (id->ndescription > 0)) {
+-      xf86MsgVerb(X_INFO, 4, "PnP checksum: 0x%02X\n", pInfo->name, sum);
++      xf86MsgVerb(X_INFO, 4, "%s: PnP checksum: 0x%02X\n", pInfo->name, sum);
+         sprintf(s, "%02X", sum & 0x0ff);
+         if (strncmp(s, &buf[len - 3], 2) != 0) {
+ #if 0
+@@ -638,11 +643,14 @@
+     return ps2SendPacket(pInfo, packet, sizeof(packet));
+ }
+ 
+-static int
++int
+ ps2GetDeviceID(InputInfoPtr pInfo)
+ {
+     unsigned char u;
+     unsigned char packet[] = { 0xf2 };
++
++    usleep(30000);
++    xf86FlushInput(pInfo->fd);
+     if (!ps2SendPacket(pInfo, packet, sizeof(packet))) 
+       return -1;
+     while (1) {
+@@ -663,7 +671,7 @@
+     unsigned char u;
+     unsigned char packet[] = { 0xff };
+     unsigned char reply[] = { 0xaa, 0x00 };
+-    int i;
++    unsigned int i;
+ #ifdef DEBUG
+    xf86ErrorF("PS/2 Mouse reset\n");
+ #endif
+@@ -696,16 +704,16 @@
+     ps2DisableDataReporting(pInfo);
+     
+     if (ps2Reset(pInfo)) { /* Reset PS2 device */
+-      unsigned char seq[] = { 243, 200, 243, 100, 243, 80, 242 };
++      unsigned char seq[] = { 243, 200, 243, 100, 243, 80 }; 
+       /* Try to identify Intelli Mouse */
+       if (ps2SendPacket(pInfo, seq, sizeof(seq))) {
+-          readMouse(pInfo,&u);
++          u = ps2GetDeviceID(pInfo);
+           if (u == 0x03) {
+               /* found IntelliMouse now try IntelliExplorer */
+-              unsigned char seq[] = { 243, 200, 243, 200, 243, 80, 242 };
++              unsigned char seq[] = { 243, 200, 243, 200, 243, 80 };
+               if (ps2SendPacket(pInfo,seq,sizeof(seq))) {
+-                  readMouse(pInfo,&u);
+-                  if (u == 0x05)
++                  u = ps2GetDeviceID(pInfo);
++                  if (u == 0x04)
+                       ret =  PROT_EXPPS2;
+                   else 
+                       ret = PROT_IMPS2;
+@@ -726,7 +734,7 @@
+ } ps2 [] = {
+     { 0x0, PROT_PS2 },
+     { 0x3, PROT_IMPS2 },
+-    { 0x5, PROT_EXPPS2 },
++    { 0x4, PROT_EXPPS2 },
+     { -1 , PROT_UNKNOWN }
+ };
+ 


Property changes on: trunk/debian/patches/000_stolen_from_HEAD_mouse_driver.diff
___________________________________________________________________
Name: svn:keywords
   + Id

Modified: trunk/debian/patches/040_extend_netmouse_support.diff
===================================================================
--- trunk/debian/patches/040_extend_netmouse_support.diff       2004-08-11 
04:56:07 UTC (rev 1726)
+++ trunk/debian/patches/040_extend_netmouse_support.diff       2004-08-11 
05:16:09 UTC (rev 1727)
@@ -2,14 +2,14 @@
 
 This patch from Mike A. Harris.
 
---- xc/programs/Xserver/hw/xfree86/input/mouse/mouse.c.netmouse        
2002-12-30 03:42:51.000000000 -0500
-+++ xc/programs/Xserver/hw/xfree86/input/mouse/mouse.c 2002-12-30 
03:43:28.000000000 -0500
-@@ -2572,7 +2572,7 @@
+--- xc/programs/Xserver/hw/xfree86/input/mouse/mouse.c~        2004-08-10 
20:47:19.000000000 -0500
++++ xc/programs/Xserver/hw/xfree86/input/mouse/mouse.c 2004-08-10 
20:47:24.000000000 -0500
+@@ -2604,7 +2604,7 @@
        case PROT_NETPS2:               /* NetMouse, NetMouse Pro, Mie Mouse */
        case PROT_NETSCPS2:             /* NetScroll */
        {
--          static unsigned char seq[] = { 232, 3, 230, 230, 230, };
+-          static unsigned char seq[] = { 232, 3, 230, 230, 230 };
 +          static unsigned char seq[] = { 232, 3, 230, 230, 230, 233 };
        
            param = seq;
-           paramlen = sizeof(seq);
+           paramlen = sizeof(seq);

Modified: trunk/debian/patches/097_mouse_zaxis_mapping_pushes_up_buttons.diff
===================================================================
--- trunk/debian/patches/097_mouse_zaxis_mapping_pushes_up_buttons.diff 
2004-08-11 04:56:07 UTC (rev 1726)
+++ trunk/debian/patches/097_mouse_zaxis_mapping_pushes_up_buttons.diff 
2004-08-11 05:16:09 UTC (rev 1727)
@@ -5,9 +5,9 @@
 Already submitted upstream; see
 <http://bugs.xfree86.org/show_bug.cgi?id=346>.
 
---- xc/programs/Xserver/hw/xfree86/input/mouse/mouse.c~        2003-10-07 
21:08:52.000000000 -0500
-+++ xc/programs/Xserver/hw/xfree86/input/mouse/mouse.c 2003-10-07 
21:09:06.000000000 -0500
-@@ -362,6 +362,45 @@
+--- xc/programs/Xserver/hw/xfree86/input/mouse/mouse.c~        2004-08-10 
20:47:50.000000000 -0500
++++ xc/programs/Xserver/hw/xfree86/input/mouse/mouse.c 2004-08-10 
20:47:56.000000000 -0500
+@@ -365,6 +365,45 @@
  }
  #endif
  
@@ -53,7 +53,7 @@
  /* Process options common to all mouse types. */
  static void
  MouseCommonOptions(InputInfoPtr pInfo)
-@@ -656,6 +695,10 @@
+@@ -659,6 +698,10 @@
      if (origButtons != pMse->buttons)
        from = X_CONFIG;
      xf86Msg(from, "%s: Buttons: %d\n", pInfo->name, pMse->buttons);
@@ -64,7 +64,7 @@
      
  }
  /*
-@@ -2120,6 +2163,23 @@
+@@ -2151,6 +2194,23 @@
      }
  }
  
@@ -88,7 +88,7 @@
  static void
  MousePostEvent(InputInfoPtr pInfo, int buttons, int dx, int dy, int dz, int 
dw)
  {
-@@ -2146,6 +2206,7 @@
+@@ -2177,6 +2237,7 @@
        }
        break;
      default:  /* buttons */

Modified: trunk/debian/xserver-xfree86.config.in
===================================================================
--- trunk/debian/xserver-xfree86.config.in      2004-08-11 04:56:07 UTC (rev 
1726)
+++ trunk/debian/xserver-xfree86.config.in      2004-08-11 05:16:09 UTC (rev 
1727)
@@ -961,7 +961,7 @@
     DEFAULT_PROTOCOL="PS/2"
     ;;
   *ttyS*|*tts/*)
-    MOUSE_PROTOCOL_CHOICES="Auto, Microsoft, MouseSystems, GlidePoint, 
ThinkingMouse, MouseMan, Logitech, IntelliMouse, MMSeries, MMHitTab"
+    MOUSE_PROTOCOL_CHOICES="Auto, Microsoft, MouseSystems, GlidePoint, 
ThinkingMouse, ValuMouseScroll, MouseMan, Logitech, IntelliMouse, MMSeries, 
MMHitTab"
     DEFAULT_PROTOCOL="Auto"
     ;;
   *input/mice)

Reply via email to