Re: Synaptics PS/2 driver and 2.6.0-test11

Dmitry Torokhov
2003-12-08T18:17:05Z

On Monday 08 December 2003 04:54 am, Peter Berg Larsen wrote:
> On Sun, 7 Dec 2003, Dmitry Torokhov wrote:
> > The difference is that GPM (I assume you are using it to get
> > Synaptics support) only logs "protocol violations" when in debug
> > mode, and then it only checks 2 first bytes.
>
> No, gpm checks the first byte and decide whether to read the following
> 5 bytes (or trough the byte away). The synaptics driver itself does the
> same tests as the kernelcode (and reports an error).
>
> Peter

You are right, Synaptics does check entire packet and reports it,
unfortunately many (most) distributions kill almost all GPM messages
because it's too noisy.

Anyway, I wonder if the patch below will help sync problem. If it does
then we can kill the warning message later.

The patch should apply to -test11 although will complain about offset
as I have some extra stuff in my tree.

Dmitry

===== drivers/input/mouse/psmouse-base.c 1.40 vs edited =====
--- 1.40/drivers/input/mouse/psmouse-base.c Sun Dec 7 02:05:20 2003
+++ edited/drivers/input/mouse/psmouse-base.c Mon Dec 8 13:05:05 2003
@@ -125,6 +125,13 @@
if (psmouse->state == PSMOUSE_IGNORE)
goto out;

+ if (flags & (SERIO_PARITY|SERIO_TIMEOUT)) {
+ printk(KERN_WARNING "psmouse: bad data from KBC -%s%s\n",
+ flags & SERIO_TIMEOUT ? " timeout" : "",
+ flags & SERIO_PARITY ? " bad parity" : "");
+ goto out;
+ }
+
if (psmouse->acking) {
switch (data) {