From: Vojtech Pavlik Date: Wed, 3 Jul 2002 18:31:19 +0000 (+0200) Subject: Handle slowly responding PS/2 mice. X-Git-Tag: v2.5.25~12^2~4^2~1 X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=29bb651a6a7355835bba9f000dc02768de62cf2e;p=history.git Handle slowly responding PS/2 mice. --- diff --git a/drivers/input/mouse/psmouse.c b/drivers/input/mouse/psmouse.c index 3b3e54548dfc..e8b03ced7b78 100644 --- a/drivers/input/mouse/psmouse.c +++ b/drivers/input/mouse/psmouse.c @@ -1,5 +1,5 @@ /* - * $Id: psmouse.c,v 1.16 2002/01/26 19:20:36 vojtech Exp $ + * $Id: psmouse.c,v 1.18 2002/03/13 10:03:43 vojtech Exp $ * * Copyright (c) 1999-2001 Vojtech Pavlik */ @@ -31,7 +31,6 @@ #include #include #include -#include MODULE_AUTHOR("Vojtech Pavlik "); MODULE_DESCRIPTION("PS/2 mouse driver"); @@ -201,7 +200,7 @@ static void psmouse_interrupt(struct serio *serio, unsigned char data, unsigned return; } - if (psmouse->pktcnt && jiffies - psmouse->last > 2) { + if (psmouse->pktcnt && time_after(jiffies, psmouse->last + HZ/20)) { printk(KERN_WARNING "psmouse.c: Lost synchronization, throwing %d bytes away.\n", psmouse->pktcnt); psmouse->pktcnt = 0; } @@ -230,7 +229,7 @@ static void psmouse_interrupt(struct serio *serio, unsigned char data, unsigned static int psmouse_sendbyte(struct psmouse *psmouse, unsigned char byte) { - int timeout = 1000; /* 10 msec */ + int timeout = 10000; /* 100 msec */ psmouse->ack = 0; psmouse->acking = 1; @@ -247,7 +246,7 @@ static int psmouse_sendbyte(struct psmouse *psmouse, unsigned char byte) static int psmouse_command(struct psmouse *psmouse, unsigned char *param, int command) { - int timeout = 100000; /* 100 msec */ + int timeout = 500000; /* 500 msec */ int send = (command >> 12) & 0xf; int receive = (command >> 8) & 0xf; int i;