mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vojtech Pavlik <vojtech@suse.cz>
To: Christopher Hoover <ch@murgatroid.com>
Cc: linux-kernel@vger.kernel.org, vojtech@suse.cz
Subject: Re: [PATCH] 2.5.43: Fix for Logitech Wheel Mouse
Date: Fri, 18 Oct 2002 11:06:25 +0200	[thread overview]
Message-ID: <20021018110625.A26788@ucw.cz> (raw)
In-Reply-To: <20021017231953.A17985@heavens.murgatroid.com>; from ch@murgatroid.com on Thu, Oct 17, 2002 at 11:20:14PM -0700

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

  parent reply	other threads:[~2002-10-18  9:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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
     [not found] <m365vz7fok.fsf@carrosse.in.glou.org>
2002-10-18 18:54 ` Christopher Hoover

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20021018110625.A26788@ucw.cz \
    --to=vojtech@suse.cz \
    --cc=ch@murgatroid.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®