2004-04-20 07:39:09

by Kim Holviala

[permalink] [raw]
Subject: [PATCH] psmouse fixes for 2.6.5

Some fixes for PS/2 mice:

- fixed hotplugging (real reset of device instead of softreset)
- support for Targus Scroller mice (from my last weeks patch)
- extended protocol probing fixed

The major change is that the probing of extended protocols is now changed to
be more configurable. Previously the driver probed for all the protocols it
knew about and stopped when it found one that the mouse accepted. This didn't
work with a bunch of mice so now you can choose the protocols which are to be
probed.

In current 2.6.5 the parameter "proto=imps" probes all protocols up to ImPS/2.
The patch changes this so that "proto=imps" ONLY probes for ImPS/2 and if
that fails uses regular PS/2. Similarly "proto=ps2pp,genps,exps" probes for
Logitech, Genius and Intellimouse Expolorer and if none found uses the bare
PS/2.

To be continued.....



Kim


Attachments:
(No filename) (854.00 B)
psmouse.patch (12.65 kB)
Download all attachments

2004-04-20 13:00:20

by Dmitry Torokhov

[permalink] [raw]
Subject: Re: [PATCH] psmouse fixes for 2.6.5

On Tuesday 20 April 2004 02:38 am, Kim Holviala wrote:
> Some fixes for PS/2 mice:
>
> - fixed hotplugging (real reset of device instead of softreset)
> - support for Targus Scroller mice (from my last weeks patch)
> - extended protocol probing fixed

Why do you have Tragus as a config option - just set the protocol mask
correctly by default...

--
Dmitry

2004-04-20 22:24:09

by Kim Holviala

[permalink] [raw]
Subject: Re: [PATCH] psmouse fixes for 2.6.5

On Tuesday 20 April 2004 15:59, Dmitry Torokhov wrote:
> On Tuesday 20 April 2004 02:38 am, Kim Holviala wrote:
> > Some fixes for PS/2 mice:
> >
> > - fixed hotplugging (real reset of device instead of softreset)
> > - support for Targus Scroller mice (from my last weeks patch)
> > - extended protocol probing fixed
>
> Why do you have Tragus as a config option - just set the protocol mask
> correctly by default...

Targus mice misuse the normal PS/2 protocol so that they can sneak through
command-filtering PS/2 ports (like on my Digital HiNote 2000). Basically they
output very strange but valid traffic when the wheel is moved. Anyway, this
is Linux, and I'd rather force people to turn it on explicitly rather than
take the risk of breaking some valid PS/2 device which might theoretically
output the same stuff.




Kim


2004-04-21 02:17:46

by Dmitry Torokhov

[permalink] [raw]
Subject: Re: [PATCH] psmouse fixes for 2.6.5

On Tuesday 20 April 2004 03:38 pm, Kim Holviala wrote:
> On Tuesday 20 April 2004 15:59, Dmitry Torokhov wrote:
> > On Tuesday 20 April 2004 02:38 am, Kim Holviala wrote:
> > > Some fixes for PS/2 mice:
> > >
> > > - fixed hotplugging (real reset of device instead of softreset)
> > > - support for Targus Scroller mice (from my last weeks patch)
> > > - extended protocol probing fixed
> >
> > Why do you have Tragus as a config option - just set the protocol mask
> > correctly by default...
>
> Targus mice misuse the normal PS/2 protocol so that they can sneak through
> command-filtering PS/2 ports (like on my Digital HiNote 2000). Basically they
> output very strange but valid traffic when the wheel is moved. Anyway, this
> is Linux, and I'd rather force people to turn it on explicitly rather than
> take the risk of breaking some valid PS/2 device which might theoretically
> output the same stuff.
>

And I think you will achieve the desired result by just doing:

-static unsigned int psmouse_max_proto = -1U;
+static unsigned int psmouse_probe_proto = PSMOUSE_ANY & ~PSMOUSE_TARGUS;

Think about distributions, they will just have turn this option on anyway.

--
Dmitry

2004-04-21 06:48:37

by Kim Holviala

[permalink] [raw]
Subject: Re: [PATCH] psmouse fixes for 2.6.5

On Wednesday 21 April 2004 05:17, Dmitry Torokhov wrote:

> > > > - support for Targus Scroller mice (from my last weeks patch)
> > >
> > > Why do you have Tragus as a config option - just set the protocol mask
> > > correctly by default...

It's not a config option, I just have a little note on the Kconfig file for
those that read the help pages.

> And I think you will achieve the desired result by just doing:
>
> -static unsigned int psmouse_max_proto = -1U;
> +static unsigned int psmouse_probe_proto = PSMOUSE_ANY & ~PSMOUSE_TARGUS;

You're right... I did have a small logic problem there - that looks much
better.



Kim

2004-04-21 07:10:12

by Dmitry Torokhov

[permalink] [raw]
Subject: Re: [PATCH] psmouse fixes for 2.6.5

Taking it off list for now...

On Wednesday 21 April 2004 01:48 am, Kim Holviala wrote:
> On Wednesday 21 April 2004 05:17, Dmitry Torokhov wrote:
>
> > > > > - support for Targus Scroller mice (from my last weeks patch)
> > > >
> > > > Why do you have Tragus as a config option - just set the protocol mask
> > > > correctly by default...
>
> It's not a config option, I just have a little note on the Kconfig file for
> those that read the help pages.

You right, sorry... I just glanced over it in the morning, saw Kconfig being
changed and jumped to a conclusion. The only excuse: -ENOCOFFEE :)

I would recommend splitting your patch in 3 pieces - one for reset, one for
targus and one for protocol selection. This way its easuier for Vojtech to
apply them.

Question - why did you kill the protocol names array?

Btw, I am also trying to work in that area, might be beneficial if we combine
our efforts. I just posted bunch of changes on the list, you may also grab
them with

bk pull bk://dtor.bkbits.net/input

--
Dmitry

2004-04-21 07:13:25

by Dmitry Torokhov

[permalink] [raw]
Subject: Re: [PATCH] psmouse fixes for 2.6.5

On Wednesday 21 April 2004 02:10 am, Dmitry Torokhov wrote:
> Taking it off list for now...

Sleep, sleep...

--
Dmitry