Re: small cleanup xf86-input-mouse

2010-11-23 Thread Alexandr Shadchin
On Mon, Nov 22, 2010 at 07:42:35PM +, Miod Vallat wrote:
> > > > Now SunMouse works through wsmouse(sunms add miod@ 20 May 2009)
> > > > so we can remove our patch to SunMouse for xf86-input-mouse.
> > > 
> > > I am not sure this is something we want to do. This code is third-party,
> > > and it does not hurt to keep the ability to run on older kernels.
> > 
> > The sunmouse protocol decoder is a local addition (it was added by
> > millert@ back in 2002 and never merged upstreams. 
> > 
> > http://www.openbsd.org/cgi-bin/cvsweb/XF4/xc/programs/Xserver/hw/xfree86/input/mouse/mouse.c.diff?r1=1.4;r2=1.5
> 
> Ah! Then my objection no longer stands.
> 
> Miod

Do I understand correctly, there is no objection? OK?

-- 
Alexandr Shadchin



Re: small cleanup xf86-input-mouse

2010-11-22 Thread Miod Vallat
> > > Now SunMouse works through wsmouse(sunms add miod@ 20 May 2009)
> > > so we can remove our patch to SunMouse for xf86-input-mouse.
> > 
> > I am not sure this is something we want to do. This code is third-party,
> > and it does not hurt to keep the ability to run on older kernels.
> 
> The sunmouse protocol decoder is a local addition (it was added by
> millert@ back in 2002 and never merged upstreams. 
> 
> http://www.openbsd.org/cgi-bin/cvsweb/XF4/xc/programs/Xserver/hw/xfree86/input/mouse/mouse.c.diff?r1=1.4;r2=1.5

Ah! Then my objection no longer stands.

Miod



Re: small cleanup xf86-input-mouse

2010-11-22 Thread Matthieu Herrb
On Mon, Nov 22, 2010 at 06:28:01PM +, Miod Vallat wrote:
> > Now SunMouse works through wsmouse(sunms add miod@ 20 May 2009)
> > so we can remove our patch to SunMouse for xf86-input-mouse.
> 
> I am not sure this is something we want to do. This code is third-party,
> and it does not hurt to keep the ability to run on older kernels.

The sunmouse protocol decoder is a local addition (it was added by
millert@ back in 2002 and never merged upstreams. 

http://www.openbsd.org/cgi-bin/cvsweb/XF4/xc/programs/Xserver/hw/xfree86/input/mouse/mouse.c.diff?r1=1.4;r2=1.5

-- 
Matthieu Herrb



Re: small cleanup xf86-input-mouse

2010-11-22 Thread Miod Vallat
> Now SunMouse works through wsmouse(sunms add miod@ 20 May 2009)
> so we can remove our patch to SunMouse for xf86-input-mouse.

I am not sure this is something we want to do. This code is third-party,
and it does not hurt to keep the ability to run on older kernels.

Miod



small cleanup xf86-input-mouse

2010-11-21 Thread Alexandr Shadchin
Now SunMouse works through wsmouse(sunms add miod@ 20 May 2009)
so we can remove our patch to SunMouse for xf86-input-mouse.

Right? OK?

-- 
Alexandr Shadchin

Index: driver/xf86-input-mouse/src/mouse.c
===
RCS file: /cvs/xenocara/driver/xf86-input-mouse/src/mouse.c,v
retrieving revision 1.8
diff -u -p -r1.8 mouse.c
--- driver/xf86-input-mouse/src/mouse.c 21 Nov 2010 15:13:52 -  1.8
+++ driver/xf86-input-mouse/src/mouse.c 21 Nov 2010 15:51:50 -
@@ -253,7 +253,6 @@ static MouseProtocolRec mouseProtocols[]
 { "IntelliMouse",  MSE_SERIAL, msDefaults, PROT_IMSERIAL },
 { "ThinkingMouse", MSE_SERIAL, msDefaults, PROT_THINKING },
 { "AceCad",MSE_SERIAL, acecadDefaults, 
PROT_ACECAD },
-{ "SunMouse",  MSE_SERIAL, mlDefaults, PROT_SUNMOUSE },
 { "ValuMouseScroll",   MSE_SERIAL, msDefaults, 
PROT_VALUMOUSESCROLL },
 
 /* Standard PS/2 */
@@ -282,8 +281,6 @@ static MouseProtocolRec mouseProtocols[]
 { NULL,MSE_NONE,   NULL,   PROT_UNKNOWN }
 };
 
-static unsigned char proto[PROT_NUMPROTOS][8];
-
 /* Process options common to all mouse types. */
 static void
 MouseCommonOptions(InputInfoPtr pInfo)
@@ -1268,14 +1265,6 @@ MouseReadInput(InputInfoPtr pInfo)
for (j = 0; j < pBufP; j++)
pBuf[j] = pBuf[j+1];
pMse->inSync = 0;
-
-   /* If SunMouse gets a 5 byte packet, switch to MouseSystems */
-   if (!baddata && pMse->protocolID == PROT_SUNMOUSE &&
-   (u & pMse->protoPara[5]) == pMse->protoPara[6]) {
-   pMse->protocolID = PROT_MSC;
-   memcpy(pMse->protoPara, proto[pMse->protocolID],
-   sizeof(pMse->protoPara));
-   }
continue;
}
/* Tell auto probe that we were successful */
@@ -1323,7 +1312,6 @@ MouseReadInput(InputInfoPtr pInfo)
break;
 
case PROT_MSC:  /* Mouse Systems Corp */
-   case PROT_SUNMOUSE:
buttons = (~pBuf[0]) & 0x07;
dx =(signed char)(pBuf[1]) + (char)(pBuf[3]);
dy = - ((signed char)(pBuf[2]) + (char)(pBuf[4]));
@@ -2428,7 +2416,6 @@ static unsigned char proto[PROT_NUMPROTO
   {  0xf8, 0x80, 0x00, 0x00,  5,   0x00, 0xff, MPF_NONE },  /* BusMouse */
   {  0xf8, 0x80, 0x00, 0x00,  5,   0x00, 0xff, MPF_NONE },  /* Auto (dummy) */
   {  0xf8, 0x80, 0x00, 0x00,  8,   0x00, 0xff, MPF_NONE },  /* SysMouse */
-  {  0xf8, 0x88, 0x00, 0x00,  3,   0xf8, 0x80, MPF_SAFE },  /* SunMouse */
 };
 
 
@@ -2727,7 +2714,6 @@ initMouseHW(InputInfoPtr pInfo)
break;
 
case PROT_MSC:  /* MouseSystems Corp */
-   case PROT_SUNMOUSE:
usleep(10);
xf86FlushInput(pInfo->fd);
break;
Index: driver/xf86-input-mouse/src/xf86OSmouse.h
===
RCS file: /cvs/xenocara/driver/xf86-input-mouse/src/xf86OSmouse.h,v
retrieving revision 1.2
diff -u -p -r1.2 xf86OSmouse.h
--- driver/xf86-input-mouse/src/xf86OSmouse.h   21 Nov 2010 15:13:52 -  
1.2
+++ driver/xf86-input-mouse/src/xf86OSmouse.h   21 Nov 2010 15:51:51 -
@@ -70,7 +70,6 @@ typedef enum {
 PROT_BM,
 PROT_AUTO,
 PROT_SYSMOUSE,
-PROT_SUNMOUSE,
 PROT_NUMPROTOS /* This must always be last. */
 } MouseProtocolID;