linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RE: [PATCH] 2.5.43: Fix for Logitech Wheel Mouse
       [not found] <m365vz7fok.fsf@carrosse.in.glou.org>
@ 2002-10-18 18:54 ` Christopher Hoover
  0 siblings, 0 replies; 9+ messages in thread
From: Christopher Hoover @ 2002-10-18 18:54 UTC (permalink / raw)
  To: 'Arnaud Gomes-do-Vale', 'Thomas Molina'
  Cc: vojtech, linux-kernel


FYI.  I have always had X configured for ImPS/2.  My wheel problem came
about immediately after booting a 2.5 kernel and using the input layer.
Before I was running a 2.4 kernel with psaux -- X was handling the mouse
protocol.

-ch

-----Original Message-----
From: arnaud@carrosse.glou.org [mailto:arnaud@carrosse.glou.org] On
Behalf Of Arnaud Gomes-do-Vale
Sent: Friday, October 18, 2002 11:42 AM
To: Thomas Molina
Cc: Christopher Hoover; vojtech@suse.cz
Subject: Re: [PATCH] 2.5.43: Fix for Logitech Wheel Mouse


Thomas Molina <tmolina@cox.net> writes:

> I am also carrying a problem report from Arnaud Gomes-do-Vale with
this 
> exact problem.  If this is deemed a proper fix it would probably close

> the other outstanding report.

Oops, I didn't acknowledge Vojtech's fix (that is, configure X for an
ImPS/2 mouse, not MouseManPlusPS/2). This works for me at least.

-- 
Amicalement,
Arnaud


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] 2.5.43: Fix for Logitech Wheel Mouse
  2002-10-19 18:45       ` Christopher Hoover
@ 2002-10-19 20:22         ` Vojtech Pavlik
  0 siblings, 0 replies; 9+ messages in thread
From: Vojtech Pavlik @ 2002-10-19 20:22 UTC (permalink / raw)
  To: Christopher Hoover; +Cc: 'Vojtech Pavlik', linux-kernel

On Sat, Oct 19, 2002 at 11:45:28AM -0700, Christopher Hoover wrote:

> Yes, that works.

Great, I'll send that patch to Linus soon.

> [ch@jukebox ch]$ cat /proc/bus/input/devices 
> I: Bus=0011 Vendor=0002 Product=0002 Version=0035
> N: Name="PS2++ Logitech Wheel Mouse"
> P: Phys=isa0060/serio1/input0
> H: Handlers=mouse0 event0 
> B: EV=7 
> B: KEY=70000 0 0 0 0 0 0 0 0 
> B: REL=103 
> 
> I: Bus=0011 Vendor=0001 Product=0002 Version=ab02
> N: Name="AT Set 2 keyboard"
> P: Phys=isa0060/serio0/input0
> H: Handlers=kbd event1 
> B: EV=120003 
> B: KEY=4 2000000 8061f9 fbc9d621 efdfffdf ffefffff ffffffff fffffffe 
> B: LED=7 
> 
> Thanks.
> 
> -ch
> 
> 
> -----Original Message-----
> From: Vojtech Pavlik [mailto:vojtech@suse.cz] 
> Sent: Saturday, October 19, 2002 12:51 AM
> To: Christopher Hoover
> Cc: 'Vojtech Pavlik'; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH] 2.5.43: Fix for Logitech Wheel Mouse
> 
> 
> On Fri, Oct 18, 2002 at 10:41:25AM -0700, Christopher Hoover wrote:
> 
> > > No, it unfortunately is not a proper fix. I'll have to analyze the
> > > problem some more.
> > 
> > Would you say more?  I looked at XFree86 sources and it seemed that
> the
> > ImPS/2 protocol best matched what my mouse was sending.
> > 
> > What about a module param/setup arg to force the mouse protocol?
> > 
> > 
> > > Can you send me the output of /proc/bus/input/devices on your system
> > > (without your fix, preferably)?
> > 
> > With*out* the patch:
> > 
> > I: Bus=0011 Vendor=0002 Product=0002 Version=0035
> > N: Name="PS2++ Logitech Mouse"
> > P: Phys=isa0060/serio1/input0
> > H: Handlers=mouse0 event0 
> > B: EV=7 
> > B: KEY=70000 0 0 0 0 0 0 0 0 
> > B: REL=3 
> 
> Thanks! Can you try this patch?
> 
>  psmouse.c |    2 +-
>  1 files changed, 1 insertion(+), 1 deletion(-)
> 
> ===================================================================
> 
> diff -Nru a/drivers/input/mouse/psmouse.c
> b/drivers/input/mouse/psmouse.c
> --- a/drivers/input/mouse/psmouse.c	Sat Oct 19 09:50:17 2002
> +++ b/drivers/input/mouse/psmouse.c	Sat Oct 19 09:50:17 2002
> @@ -348,7 +348,7 @@
>  
>  		int i;
>  		static int logitech_4btn[] = { 12, 40, 41, 42, 43, 52,
> 73, 80, -1 };
> -		static int logitech_wheel[] = { 52, 75, 76, 80, 81, 83,
> 88, -1 };
> +		static int logitech_wheel[] = { 52, 53, 75, 76, 80, 81,
> 83, 88, -1 };
>  		static int logitech_ps2pp[] = { 12, 13, 40, 41, 42, 43,
> 50, 51, 52, 53, 73, 75,
>  							76, 80, 81, 83,
> 88, 96, 97, -1 };
>  		psmouse->vendor = "Logitech";
> 
> ===================================================================
> 
> -- 
> Vojtech Pavlik
> SuSE Labs

-- 
Vojtech Pavlik
SuSE Labs

^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [PATCH] 2.5.43: Fix for Logitech Wheel Mouse
  2002-10-19  7:51     ` Vojtech Pavlik
@ 2002-10-19 18:45       ` Christopher Hoover
  2002-10-19 20:22         ` Vojtech Pavlik
  0 siblings, 1 reply; 9+ messages in thread
From: Christopher Hoover @ 2002-10-19 18:45 UTC (permalink / raw)
  To: 'Vojtech Pavlik'; +Cc: linux-kernel


Yes, that works.

[ch@jukebox ch]$ cat /proc/bus/input/devices 
I: Bus=0011 Vendor=0002 Product=0002 Version=0035
N: Name="PS2++ Logitech Wheel Mouse"
P: Phys=isa0060/serio1/input0
H: Handlers=mouse0 event0 
B: EV=7 
B: KEY=70000 0 0 0 0 0 0 0 0 
B: REL=103 

I: Bus=0011 Vendor=0001 Product=0002 Version=ab02
N: Name="AT Set 2 keyboard"
P: Phys=isa0060/serio0/input0
H: Handlers=kbd event1 
B: EV=120003 
B: KEY=4 2000000 8061f9 fbc9d621 efdfffdf ffefffff ffffffff fffffffe 
B: LED=7 

Thanks.

-ch


-----Original Message-----
From: Vojtech Pavlik [mailto:vojtech@suse.cz] 
Sent: Saturday, October 19, 2002 12:51 AM
To: Christopher Hoover
Cc: 'Vojtech Pavlik'; linux-kernel@vger.kernel.org
Subject: Re: [PATCH] 2.5.43: Fix for Logitech Wheel Mouse


On Fri, Oct 18, 2002 at 10:41:25AM -0700, Christopher Hoover wrote:

> > No, it unfortunately is not a proper fix. I'll have to analyze the
> > problem some more.
> 
> Would you say more?  I looked at XFree86 sources and it seemed that
the
> ImPS/2 protocol best matched what my mouse was sending.
> 
> What about a module param/setup arg to force the mouse protocol?
> 
> 
> > Can you send me the output of /proc/bus/input/devices on your system
> > (without your fix, preferably)?
> 
> With*out* the patch:
> 
> I: Bus=0011 Vendor=0002 Product=0002 Version=0035
> N: Name="PS2++ Logitech Mouse"
> P: Phys=isa0060/serio1/input0
> H: Handlers=mouse0 event0 
> B: EV=7 
> B: KEY=70000 0 0 0 0 0 0 0 0 
> B: REL=3 

Thanks! Can you try this patch?

 psmouse.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

===================================================================

diff -Nru a/drivers/input/mouse/psmouse.c
b/drivers/input/mouse/psmouse.c
--- a/drivers/input/mouse/psmouse.c	Sat Oct 19 09:50:17 2002
+++ b/drivers/input/mouse/psmouse.c	Sat Oct 19 09:50:17 2002
@@ -348,7 +348,7 @@
 
 		int i;
 		static int logitech_4btn[] = { 12, 40, 41, 42, 43, 52,
73, 80, -1 };
-		static int logitech_wheel[] = { 52, 75, 76, 80, 81, 83,
88, -1 };
+		static int logitech_wheel[] = { 52, 53, 75, 76, 80, 81,
83, 88, -1 };
 		static int logitech_ps2pp[] = { 12, 13, 40, 41, 42, 43,
50, 51, 52, 53, 73, 75,
 							76, 80, 81, 83,
88, 96, 97, -1 };
 		psmouse->vendor = "Logitech";

===================================================================

-- 
Vojtech Pavlik
SuSE Labs


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] 2.5.43: Fix for Logitech Wheel Mouse
  2002-10-18 17:41   ` Christopher Hoover
@ 2002-10-19  7:51     ` Vojtech Pavlik
  2002-10-19 18:45       ` Christopher Hoover
  0 siblings, 1 reply; 9+ messages in thread
From: Vojtech Pavlik @ 2002-10-19  7:51 UTC (permalink / raw)
  To: Christopher Hoover; +Cc: 'Vojtech Pavlik', linux-kernel

On Fri, Oct 18, 2002 at 10:41:25AM -0700, Christopher Hoover wrote:

> > No, it unfortunately is not a proper fix. I'll have to analyze the
> > problem some more.
> 
> Would you say more?  I looked at XFree86 sources and it seemed that the
> ImPS/2 protocol best matched what my mouse was sending.
> 
> What about a module param/setup arg to force the mouse protocol?
> 
> 
> > Can you send me the output of /proc/bus/input/devices on your system
> > (without your fix, preferably)?
> 
> With*out* the patch:
> 
> I: Bus=0011 Vendor=0002 Product=0002 Version=0035
> N: Name="PS2++ Logitech Mouse"
> P: Phys=isa0060/serio1/input0
> H: Handlers=mouse0 event0 
> B: EV=7 
> B: KEY=70000 0 0 0 0 0 0 0 0 
> B: REL=3 

Thanks! Can you try this patch?

 psmouse.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

===================================================================

diff -Nru a/drivers/input/mouse/psmouse.c b/drivers/input/mouse/psmouse.c
--- a/drivers/input/mouse/psmouse.c	Sat Oct 19 09:50:17 2002
+++ b/drivers/input/mouse/psmouse.c	Sat Oct 19 09:50:17 2002
@@ -348,7 +348,7 @@
 
 		int i;
 		static int logitech_4btn[] = { 12, 40, 41, 42, 43, 52, 73, 80, -1 };
-		static int logitech_wheel[] = { 52, 75, 76, 80, 81, 83, 88, -1 };
+		static int logitech_wheel[] = { 52, 53, 75, 76, 80, 81, 83, 88, -1 };
 		static int logitech_ps2pp[] = { 12, 13, 40, 41, 42, 43, 50, 51, 52, 53, 73, 75,
 							76, 80, 81, 83, 88, 96, 97, -1 };
 		psmouse->vendor = "Logitech";

===================================================================

-- 
Vojtech Pavlik
SuSE Labs

^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [PATCH] 2.5.43: Fix for Logitech Wheel Mouse
  2002-10-18  9:06 ` Vojtech Pavlik
@ 2002-10-18 17:41   ` Christopher Hoover
  2002-10-19  7:51     ` Vojtech Pavlik
  0 siblings, 1 reply; 9+ messages in thread
From: Christopher Hoover @ 2002-10-18 17:41 UTC (permalink / raw)
  To: 'Vojtech Pavlik'; +Cc: linux-kernel

> No, it unfortunately is not a proper fix. I'll have to analyze the
> problem some more.

Would you say more?  I looked at XFree86 sources and it seemed that the
ImPS/2 protocol best matched what my mouse was sending.

What about a module param/setup arg to force the mouse protocol?


> Can you send me the output of /proc/bus/input/devices on your system
> (without your fix, preferably)?

With*out* the patch:

I: Bus=0011 Vendor=0002 Product=0002 Version=0035
N: Name="PS2++ Logitech Mouse"
P: Phys=isa0060/serio1/input0
H: Handlers=mouse0 event0 
B: EV=7 
B: KEY=70000 0 0 0 0 0 0 0 0 
B: REL=3 

I: Bus=0011 Vendor=0001 Product=0002 Version=ab02
N: Name="AT Set 2 keyboard"
P: Phys=isa0060/serio0/input0
H: Handlers=kbd event1 
B: EV=120003 
B: KEY=4 2000000 8061f9 fbc9d621 efdfffdf ffefffff ffffffff fffffffe 
B: LED=7 


With the patch:

I: Bus=0011 Vendor=0002 Product=0005 Version=0035
N: Name="ImPS/2 Logitech Wheel Mouse"
P: Phys=isa0060/serio1/input0
H: Handlers=mouse0 event0 
B: EV=7 
B: KEY=70000 0 0 0 0 0 0 0 0 
B: REL=103 

I: Bus=0011 Vendor=0001 Product=0002 Version=ab02
N: Name="AT Set 2 keyboard"
P: Phys=isa0060/serio0/input0
H: Handlers=kbd event1 
B: EV=120003 
B: KEY=4 2000000 8061f9 fbc9d621 efdfffdf ffefffff ffffffff fffffffe 
B: LED=7 




-----Original Message-----
From: Vojtech Pavlik [mailto:vojtech@suse.cz] 
Sent: Friday, October 18, 2002 2:06 AM
To: Christopher Hoover
Cc: linux-kernel@vger.kernel.org; vojtech@suse.cz
Subject: Re: [PATCH] 2.5.43: Fix for Logitech Wheel Mouse


On Thu, Oct 17, 2002 at 11:20:14PM -0700, Christopher Hoover wrote:
> The wheel on my Logitech mouse doesn't work under the input layer.
> The mouse was originally recognized as:
> 
>   input: PS2++ Logitech Mouse on isa0060/serio1
> 
> In this mode, the driver also emits (just once?):
> 
>   psmouse.c: Received PS2++ packet #0, but don't know how to handle.
> 
> 
> The following patch simply swaps the order of detection of Logitech PS
> 2++ and Intellimouse protocols.  Now my mouse is recognized as:
> 
>   input: ImPS/2 Logitech Wheel Mouse on isa0060/serio1
> 
> And the wheel works properly in this mode.

Can you send me the output of /proc/bus/input/devices on your system
(without your fix, preferably)?

I'd like to know whether the driver thinks the mouse has a wheel or not.

> -ch
> ch@murgatroid.com
> ch@hpl.hp.com
> 
> 
> PATCH FOLLOWS
> --- linux-2.5.43/drivers/input/mouse/psmouse.c.orig	Tue Oct 15
20:27:22 2002
> +++ linux-2.5.43/drivers/input/mouse/psmouse.c	Thu Oct 17
22:45:05 2002
> @@ -378,40 +378,6 @@
>  				}
>  
>  /*
> - * Do Logitech PS2++ / PS2T++ magic init.
> - */
> -
> -			if (psmouse->model == 97) { /* TouchPad 3 */
> -
> -				set_bit(REL_WHEEL, psmouse->dev.relbit);
> -				set_bit(REL_HWHEEL,
psmouse->dev.relbit);
> -
> -				param[0] = 0x11; param[1] = 0x04;
param[2] = 0x68; /* Unprotect RAM */
> -				psmouse_command(psmouse, param, 0x30d1);
> -				param[0] = 0x11; param[1] = 0x05;
param[2] = 0x0b; /* Enable features */
> -				psmouse_command(psmouse, param, 0x30d1);
> -				param[0] = 0x11; param[1] = 0x09;
param[2] = 0xc3; /* Enable PS2++ */
> -				psmouse_command(psmouse, param, 0x30d1);
> -
> -				param[0] = 0;
> -				if (!psmouse_command(psmouse, param,
0x13d1) &&
> -					param[0] == 0x06 && param[1] ==
0x00 && param[2] == 0x14)
> -					return PSMOUSE_PS2TPP;
> -
> -			} else {
> -				param[0] = param[1] = param[2] = 0;
> -
> -				psmouse_ps2pp_cmd(psmouse, param, 0x39);
/* Magic knock */
> -				psmouse_ps2pp_cmd(psmouse, param, 0xDB);
> -
> -				if ((param[0] & 0x78) == 0x48 &&
(param[1] & 0xf3) == 0xc2 &&
> -					(param[2] & 3) == ((param[1] >>
2) & 3))
> -						return PSMOUSE_PS2PP;
> -			}
> -		}
> -	}
> -
> -/*
>   * Try IntelliMouse magic init.
>   */
>  
> @@ -450,6 +416,40 @@
>  
>  		psmouse->name = "Wheel Mouse";
>  		return PSMOUSE_IMPS;
> +	}
> +
> +/*
> + * Do Logitech PS2++ / PS2T++ magic init.
> + */
> +
> +			if (psmouse->model == 97) { /* TouchPad 3 */
> +
> +				set_bit(REL_WHEEL, psmouse->dev.relbit);
> +				set_bit(REL_HWHEEL,
psmouse->dev.relbit);
> +
> +				param[0] = 0x11; param[1] = 0x04;
param[2] = 0x68; /* Unprotect RAM */
> +				psmouse_command(psmouse, param, 0x30d1);
> +				param[0] = 0x11; param[1] = 0x05;
param[2] = 0x0b; /* Enable features */
> +				psmouse_command(psmouse, param, 0x30d1);
> +				param[0] = 0x11; param[1] = 0x09;
param[2] = 0xc3; /* Enable PS2++ */
> +				psmouse_command(psmouse, param, 0x30d1);
> +
> +				param[0] = 0;
> +				if (!psmouse_command(psmouse, param,
0x13d1) &&
> +					param[0] == 0x06 && param[1] ==
0x00 && param[2] == 0x14)
> +					return PSMOUSE_PS2TPP;
> +
> +			} else {
> +				param[0] = param[1] = param[2] = 0;
> +
> +				psmouse_ps2pp_cmd(psmouse, param, 0x39);
/* Magic knock */
> +				psmouse_ps2pp_cmd(psmouse, param, 0xDB);
> +
> +				if ((param[0] & 0x78) == 0x48 &&
(param[1] & 0xf3) == 0xc2 &&
> +					(param[2] & 3) == ((param[1] >>
2) & 3))
> +						return PSMOUSE_PS2PP;
> +			}
> +		}
>  	}
>  
>  /*

-- 
Vojtech Pavlik
SuSE Labs


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] 2.5.43: Fix for Logitech Wheel Mouse
  2002-10-18  6:20 Christopher Hoover
  2002-10-18  9:00 ` Thomas Molina
@ 2002-10-18  9:06 ` Vojtech Pavlik
  2002-10-18 17:41   ` Christopher Hoover
  1 sibling, 1 reply; 9+ messages in thread
From: Vojtech Pavlik @ 2002-10-18  9:06 UTC (permalink / raw)
  To: Christopher Hoover; +Cc: linux-kernel, vojtech

On Thu, Oct 17, 2002 at 11:20:14PM -0700, Christopher Hoover wrote:
> The wheel on my Logitech mouse doesn't work under the input layer.
> The mouse was originally recognized as:
> 
>   input: PS2++ Logitech Mouse on isa0060/serio1
> 
> In this mode, the driver also emits (just once?):
> 
>   psmouse.c: Received PS2++ packet #0, but don't know how to handle.
> 
> 
> The following patch simply swaps the order of detection of Logitech PS
> 2++ and Intellimouse protocols.  Now my mouse is recognized as:
> 
>   input: ImPS/2 Logitech Wheel Mouse on isa0060/serio1
> 
> And the wheel works properly in this mode.

Can you send me the output of /proc/bus/input/devices on your system
(without your fix, preferably)?

I'd like to know whether the driver thinks the mouse has a wheel or not.

> -ch
> ch@murgatroid.com
> ch@hpl.hp.com
> 
> 
> PATCH FOLLOWS
> --- linux-2.5.43/drivers/input/mouse/psmouse.c.orig	Tue Oct 15 20:27:22 2002
> +++ linux-2.5.43/drivers/input/mouse/psmouse.c	Thu Oct 17 22:45:05 2002
> @@ -378,40 +378,6 @@
>  				}
>  
>  /*
> - * Do Logitech PS2++ / PS2T++ magic init.
> - */
> -
> -			if (psmouse->model == 97) { /* TouchPad 3 */
> -
> -				set_bit(REL_WHEEL, psmouse->dev.relbit);
> -				set_bit(REL_HWHEEL, psmouse->dev.relbit);
> -
> -				param[0] = 0x11; param[1] = 0x04; param[2] = 0x68; /* Unprotect RAM */
> -				psmouse_command(psmouse, param, 0x30d1);
> -				param[0] = 0x11; param[1] = 0x05; param[2] = 0x0b; /* Enable features */
> -				psmouse_command(psmouse, param, 0x30d1);
> -				param[0] = 0x11; param[1] = 0x09; param[2] = 0xc3; /* Enable PS2++ */
> -				psmouse_command(psmouse, param, 0x30d1);
> -
> -				param[0] = 0;
> -				if (!psmouse_command(psmouse, param, 0x13d1) &&
> -					param[0] == 0x06 && param[1] == 0x00 && param[2] == 0x14)
> -					return PSMOUSE_PS2TPP;
> -
> -			} else {
> -				param[0] = param[1] = param[2] = 0;
> -
> -				psmouse_ps2pp_cmd(psmouse, param, 0x39); /* Magic knock */
> -				psmouse_ps2pp_cmd(psmouse, param, 0xDB);
> -
> -				if ((param[0] & 0x78) == 0x48 && (param[1] & 0xf3) == 0xc2 &&
> -					(param[2] & 3) == ((param[1] >> 2) & 3))
> -						return PSMOUSE_PS2PP;
> -			}
> -		}
> -	}
> -
> -/*
>   * Try IntelliMouse magic init.
>   */
>  
> @@ -450,6 +416,40 @@
>  
>  		psmouse->name = "Wheel Mouse";
>  		return PSMOUSE_IMPS;
> +	}
> +
> +/*
> + * Do Logitech PS2++ / PS2T++ magic init.
> + */
> +
> +			if (psmouse->model == 97) { /* TouchPad 3 */
> +
> +				set_bit(REL_WHEEL, psmouse->dev.relbit);
> +				set_bit(REL_HWHEEL, psmouse->dev.relbit);
> +
> +				param[0] = 0x11; param[1] = 0x04; param[2] = 0x68; /* Unprotect RAM */
> +				psmouse_command(psmouse, param, 0x30d1);
> +				param[0] = 0x11; param[1] = 0x05; param[2] = 0x0b; /* Enable features */
> +				psmouse_command(psmouse, param, 0x30d1);
> +				param[0] = 0x11; param[1] = 0x09; param[2] = 0xc3; /* Enable PS2++ */
> +				psmouse_command(psmouse, param, 0x30d1);
> +
> +				param[0] = 0;
> +				if (!psmouse_command(psmouse, param, 0x13d1) &&
> +					param[0] == 0x06 && param[1] == 0x00 && param[2] == 0x14)
> +					return PSMOUSE_PS2TPP;
> +
> +			} else {
> +				param[0] = param[1] = param[2] = 0;
> +
> +				psmouse_ps2pp_cmd(psmouse, param, 0x39); /* Magic knock */
> +				psmouse_ps2pp_cmd(psmouse, param, 0xDB);
> +
> +				if ((param[0] & 0x78) == 0x48 && (param[1] & 0xf3) == 0xc2 &&
> +					(param[2] & 3) == ((param[1] >> 2) & 3))
> +						return PSMOUSE_PS2PP;
> +			}
> +		}
>  	}
>  
>  /*

-- 
Vojtech Pavlik
SuSE Labs

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] 2.5.43: Fix for Logitech Wheel Mouse
  2002-10-18  9:00 ` Thomas Molina
@ 2002-10-18  9:03   ` Vojtech Pavlik
  0 siblings, 0 replies; 9+ messages in thread
From: Vojtech Pavlik @ 2002-10-18  9:03 UTC (permalink / raw)
  To: Thomas Molina
  Cc: Christopher Hoover, linux-kernel, vojtech, Arnaud Gomes-do-Vale

On Fri, Oct 18, 2002 at 04:00:37AM -0500, Thomas Molina wrote:

> On Thu, 17 Oct 2002, Christopher Hoover wrote:
> 
> > The wheel on my Logitech mouse doesn't work under the input layer.
> > The mouse was originally recognized as:
> > 
> >   input: PS2++ Logitech Mouse on isa0060/serio1
> > 
> > In this mode, the driver also emits (just once?):
> > 
> >   psmouse.c: Received PS2++ packet #0, but don't know how to handle.
> > 
> > 
> > The following patch simply swaps the order of detection of Logitech PS
> > 2++ and Intellimouse protocols.  Now my mouse is recognized as:
> > 
> >   input: ImPS/2 Logitech Wheel Mouse on isa0060/serio1
> > 
> > And the wheel works properly in this mode.
> 
> I am also carrying a problem report from Arnaud Gomes-do-Vale with this 
> exact problem.  If this is deemed a proper fix it would probably close 
> the other outstanding report.

No, it unfortunately is not a proper fix. I'll have to analyze the
problem some more.

-- 
Vojtech Pavlik
SuSE Labs

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] 2.5.43: Fix for Logitech Wheel Mouse
  2002-10-18  6:20 Christopher Hoover
@ 2002-10-18  9:00 ` Thomas Molina
  2002-10-18  9:03   ` Vojtech Pavlik
  2002-10-18  9:06 ` Vojtech Pavlik
  1 sibling, 1 reply; 9+ messages in thread
From: Thomas Molina @ 2002-10-18  9:00 UTC (permalink / raw)
  To: Christopher Hoover; +Cc: linux-kernel, vojtech, Arnaud Gomes-do-Vale

On Thu, 17 Oct 2002, Christopher Hoover wrote:

> The wheel on my Logitech mouse doesn't work under the input layer.
> The mouse was originally recognized as:
> 
>   input: PS2++ Logitech Mouse on isa0060/serio1
> 
> In this mode, the driver also emits (just once?):
> 
>   psmouse.c: Received PS2++ packet #0, but don't know how to handle.
> 
> 
> The following patch simply swaps the order of detection of Logitech PS
> 2++ and Intellimouse protocols.  Now my mouse is recognized as:
> 
>   input: ImPS/2 Logitech Wheel Mouse on isa0060/serio1
> 
> And the wheel works properly in this mode.

I am also carrying a problem report from Arnaud Gomes-do-Vale with this 
exact problem.  If this is deemed a proper fix it would probably close 
the other outstanding report.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH] 2.5.43: Fix for Logitech Wheel Mouse
@ 2002-10-18  6:20 Christopher Hoover
  2002-10-18  9:00 ` Thomas Molina
  2002-10-18  9:06 ` Vojtech Pavlik
  0 siblings, 2 replies; 9+ messages in thread
From: Christopher Hoover @ 2002-10-18  6:20 UTC (permalink / raw)
  To: linux-kernel; +Cc: vojtech, ch

The wheel on my Logitech mouse doesn't work under the input layer.
The mouse was originally recognized as:

  input: PS2++ Logitech Mouse on isa0060/serio1

In this mode, the driver also emits (just once?):

  psmouse.c: Received PS2++ packet #0, but don't know how to handle.


The following patch simply swaps the order of detection of Logitech PS
2++ and Intellimouse protocols.  Now my mouse is recognized as:

  input: ImPS/2 Logitech Wheel Mouse on isa0060/serio1

And the wheel works properly in this mode.


-ch
ch@murgatroid.com
ch@hpl.hp.com


PATCH FOLLOWS
--- linux-2.5.43/drivers/input/mouse/psmouse.c.orig	Tue Oct 15 20:27:22 2002
+++ linux-2.5.43/drivers/input/mouse/psmouse.c	Thu Oct 17 22:45:05 2002
@@ -378,40 +378,6 @@
 				}
 
 /*
- * Do Logitech PS2++ / PS2T++ magic init.
- */
-
-			if (psmouse->model == 97) { /* TouchPad 3 */
-
-				set_bit(REL_WHEEL, psmouse->dev.relbit);
-				set_bit(REL_HWHEEL, psmouse->dev.relbit);
-
-				param[0] = 0x11; param[1] = 0x04; param[2] = 0x68; /* Unprotect RAM */
-				psmouse_command(psmouse, param, 0x30d1);
-				param[0] = 0x11; param[1] = 0x05; param[2] = 0x0b; /* Enable features */
-				psmouse_command(psmouse, param, 0x30d1);
-				param[0] = 0x11; param[1] = 0x09; param[2] = 0xc3; /* Enable PS2++ */
-				psmouse_command(psmouse, param, 0x30d1);
-
-				param[0] = 0;
-				if (!psmouse_command(psmouse, param, 0x13d1) &&
-					param[0] == 0x06 && param[1] == 0x00 && param[2] == 0x14)
-					return PSMOUSE_PS2TPP;
-
-			} else {
-				param[0] = param[1] = param[2] = 0;
-
-				psmouse_ps2pp_cmd(psmouse, param, 0x39); /* Magic knock */
-				psmouse_ps2pp_cmd(psmouse, param, 0xDB);
-
-				if ((param[0] & 0x78) == 0x48 && (param[1] & 0xf3) == 0xc2 &&
-					(param[2] & 3) == ((param[1] >> 2) & 3))
-						return PSMOUSE_PS2PP;
-			}
-		}
-	}
-
-/*
  * Try IntelliMouse magic init.
  */
 
@@ -450,6 +416,40 @@
 
 		psmouse->name = "Wheel Mouse";
 		return PSMOUSE_IMPS;
+	}
+
+/*
+ * Do Logitech PS2++ / PS2T++ magic init.
+ */
+
+			if (psmouse->model == 97) { /* TouchPad 3 */
+
+				set_bit(REL_WHEEL, psmouse->dev.relbit);
+				set_bit(REL_HWHEEL, psmouse->dev.relbit);
+
+				param[0] = 0x11; param[1] = 0x04; param[2] = 0x68; /* Unprotect RAM */
+				psmouse_command(psmouse, param, 0x30d1);
+				param[0] = 0x11; param[1] = 0x05; param[2] = 0x0b; /* Enable features */
+				psmouse_command(psmouse, param, 0x30d1);
+				param[0] = 0x11; param[1] = 0x09; param[2] = 0xc3; /* Enable PS2++ */
+				psmouse_command(psmouse, param, 0x30d1);
+
+				param[0] = 0;
+				if (!psmouse_command(psmouse, param, 0x13d1) &&
+					param[0] == 0x06 && param[1] == 0x00 && param[2] == 0x14)
+					return PSMOUSE_PS2TPP;
+
+			} else {
+				param[0] = param[1] = param[2] = 0;
+
+				psmouse_ps2pp_cmd(psmouse, param, 0x39); /* Magic knock */
+				psmouse_ps2pp_cmd(psmouse, param, 0xDB);
+
+				if ((param[0] & 0x78) == 0x48 && (param[1] & 0xf3) == 0xc2 &&
+					(param[2] & 3) == ((param[1] >> 2) & 3))
+						return PSMOUSE_PS2PP;
+			}
+		}
 	}
 
 /*

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2002-10-19 20:16 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <m365vz7fok.fsf@carrosse.in.glou.org>
2002-10-18 18:54 ` [PATCH] 2.5.43: Fix for Logitech Wheel Mouse Christopher Hoover
2002-10-18  6:20 Christopher Hoover
2002-10-18  9:00 ` Thomas Molina
2002-10-18  9:03   ` Vojtech Pavlik
2002-10-18  9:06 ` Vojtech Pavlik
2002-10-18 17:41   ` Christopher Hoover
2002-10-19  7:51     ` Vojtech Pavlik
2002-10-19 18:45       ` Christopher Hoover
2002-10-19 20:22         ` Vojtech Pavlik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).