mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: Logitech wheel and 2.5? (PS/2)
@ 2002-11-02 20:54 Kari Hameenaho
  2002-11-02 21:40 ` Gregoire Favre
  0 siblings, 1 reply; 7+ messages in thread
From: Kari Hameenaho @ 2002-11-02 20:54 UTC (permalink / raw)
  To: linux-kernel

Gregoire Favre wrote:

>patched, but I got:
>
>  drivers/input/mouse/psmouse.c drivers/input/mouse/psmouse.c: In
>  function `psmouse_process_packet': drivers/input/mouse/psmouse.c:90:
>  label `out' used but not defined make[3]: ***
>  [drivers/input/mouse/psmouse.o] Error 1 make[2]: ***
>  [drivers/input/mouse] Error 2 make[1]: *** [drivers/input] Error 2
make: *** [drivers] Error 2

There was a line +out: in my patch, maybe you did not apply it correctly
or the mail caused some changes to patch part. Note that it is against 
2.5.45. All os the patch is in one function, so it is quite possible to do 
patching manually (it is only 5 lines anyway), if it somehow gets 
corrupted.

Here it is again:

--- linux-2.5.45/drivers/input/mouse/psmouse.c	Thu Oct 31 02:42:20 2002
+++ linux-2.5.45-usb/drivers/input/mouse/psmouse.c	Fri Nov  1 22:28:25 2002
@@ -85,6 +85,11 @@
 
 	if (psmouse->type == PSMOUSE_PS2PP || psmouse->type == PSMOUSE_PS2TPP) {
 
+		/* Logitech radio/battery status or strangeness ?????? */
+		if (packet[0] == 0xd8) {
+			goto out;
+		}
+
 		if ((packet[0] & 0x40) == 0x40 && (int) packet[1] - (int) ((packet[0] & 0x10) << 4) > 191 ) {
 
 			switch (((packet[1] >> 4) & 0x03) | ((packet[0] >> 2) & 0xc0)) {
@@ -157,6 +162,7 @@
 	input_report_rel(dev, REL_X, packet[1] ? (int) packet[1] - (int) ((packet[0] << 4) & 0x100) : 0);
 	input_report_rel(dev, REL_Y, packet[2] ? (int) ((packet[0] << 3) & 0x100) - (int) packet[2] : 0);
 
+out:
 	input_sync(dev);
 }
 

^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: Logitech wheel and 2.5? (PS/2)
@ 2002-11-02  9:03 Kari Hameenaho
  2002-11-02 10:16 ` Gregoire Favre
  0 siblings, 1 reply; 7+ messages in thread
From: Kari Hameenaho @ 2002-11-02  9:03 UTC (permalink / raw)
  To: linux-kernel

On Thu, 31 Oct 2002, Gregoire Favre wrote:

> Hello,
>
> up to 2.5.45:
>
> ...
> register interface 'mouse' with class 'input
> mice: PS/2 mouse device common for all mice
> input: PC Speaker
> input: PS2++ Logitech Wheel Mouse on isa0060/serio1
> ...
> psmouse.c: Received PS2++ packet #0, but don't know how to handle.
> psmouse.c: Received PS2++ packet #0, but don't know how to handle.
> ...
>
> And very regulary my mouse position is lost and reseted???
> Also the wheel don't work (don't know for the button on the left that
> I never use: the 3 regulars one and the wheel are enough for me...).

The packet #0 message is not causing any trouble.

The wheel will work in X with mouse set to imps/2, in XF86Config(-4):
Section "InputDevice"
..
    Option "Protocol"    "ImPS/2"
    Option "ZAxisMapping" "4 5"
...
EndSection

Button on left may act same as middle button, at least for me it is and
nicer to use.

Mouse position loose seems to be caused by strange messages from mouse:
is your mouse wireless too ?
Here is a patch that works for me: note that it is too ugly for real
inclusion and may cause troubles in other setups. But you can try it if
you want. I have sent it to maintainer too, maybe a better solution will
arrive in future kernels.

--- linux-2.5.45/drivers/input/mouse/psmouse.c	Thu Oct 31 02:42:20 2002
+++ linux-2.5.45-usb/drivers/input/mouse/psmouse.c	Fri Nov  1 22:28:25 2002
@@ -85,6 +85,11 @@
 
 	if (psmouse->type == PSMOUSE_PS2PP || psmouse->type == PSMOUSE_PS2TPP) {
 
+		/* Logitech radio/battery status or strangeness ?????? */
+		if (packet[0] == 0xd8) {
+			goto out;
+		}
+
 		if ((packet[0] & 0x40) == 0x40 && (int) packet[1] - (int) ((packet[0] & 0x10) << 4) > 191 ) {
 
 			switch (((packet[1] >> 4) & 0x03) | ((packet[0] >> 2) & 0xc0)) {
@@ -157,6 +162,7 @@
 	input_report_rel(dev, REL_X, packet[1] ? (int) packet[1] - (int) ((packet[0] << 4) & 0x100) : 0);
 	input_report_rel(dev, REL_Y, packet[2] ? (int) ((packet[0] << 3) & 0x100) - (int) packet[2] : 0);
 
+out:
 	input_sync(dev);
 }
 
---
Kari Hämeenaho

^ permalink raw reply	[flat|nested] 7+ messages in thread
* Logitech wheel and 2.5? (PS/2)
@ 2002-10-31 22:34 Gregoire Favre
  2002-11-01 10:41 ` Thomas Molina
  0 siblings, 1 reply; 7+ messages in thread
From: Gregoire Favre @ 2002-10-31 22:34 UTC (permalink / raw)
  To: linux-kernel

Hello,

up to 2.5.45:

...
register interface 'mouse' with class 'input
mice: PS/2 mouse device common for all mice
input: PC Speaker
input: PS2++ Logitech Wheel Mouse on isa0060/serio1
...
psmouse.c: Received PS2++ packet #0, but don't know how to handle.
psmouse.c: Received PS2++ packet #0, but don't know how to handle.
...

And very regulary my mouse position is lost and reseted???
Also the wheel don't work (don't know for the button on the left that I
never use: the 3 regulars one and the wheel are enough for me...).

Thank you,

	Grégoire
________________________________________________________________
http://ulima.unil.ch/greg ICQ:16624071 mailto:greg@ulima.unil.ch

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

end of thread, other threads:[~2002-11-02 21:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-02 20:54 Logitech wheel and 2.5? (PS/2) Kari Hameenaho
2002-11-02 21:40 ` Gregoire Favre
  -- strict thread matches above, loose matches on Subject: below --
2002-11-02  9:03 Kari Hameenaho
2002-11-02 10:16 ` Gregoire Favre
2002-10-31 22:34 Gregoire Favre
2002-11-01 10:41 ` Thomas Molina
2002-11-01 11:37   ` Gregoire Favre

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®