From: Dmitry Torokhov Change the way timeouts/parity errors are handled: - Only complain about errors from keyboard controller if mouse is activated - Reset packet count to 0 as the next received byte will most likely be the first byte of a new packet - If expecting an ACK from the mouse set NACK condition --- drivers/input/mouse/psmouse-base.c | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) diff -puN drivers/input/mouse/psmouse-base.c~psmouse-timeout-parity-fixes drivers/input/mouse/psmouse-base.c --- 25/drivers/input/mouse/psmouse-base.c~psmouse-timeout-parity-fixes 2004-01-14 11:12:13.000000000 -0800 +++ 25-akpm/drivers/input/mouse/psmouse-base.c 2004-01-14 11:12:13.000000000 -0800 @@ -122,9 +122,15 @@ static irqreturn_t psmouse_interrupt(str goto out; if (flags & (SERIO_PARITY|SERIO_TIMEOUT)) { - printk(KERN_WARNING "psmouse.c: bad data from KBC -%s%s\n", - flags & SERIO_TIMEOUT ? " timeout" : "", - flags & SERIO_PARITY ? " bad parity" : ""); + if (psmouse->state == PSMOUSE_ACTIVATED) + printk(KERN_WARNING "psmouse.c: bad data from KBC -%s%s\n", + flags & SERIO_TIMEOUT ? " timeout" : "", + flags & SERIO_PARITY ? " bad parity" : ""); + if (psmouse->acking) { + psmouse->ack = -1; + psmouse->acking = 0; + } + psmouse->pktcnt = 0; goto out; } _