Commit c4a6a7cf authored by Dmitry Torokhov's avatar Dmitry Torokhov Committed by Vojtech Pavlik

input: If we get a byte with timeout or parity flags in psmouse.c,

       we take the appropriate action. (throw the byte away, reset
       byte counter, return NAK if acking, and complain).
parent 5554db37
...@@ -121,6 +121,19 @@ static irqreturn_t psmouse_interrupt(struct serio *serio, ...@@ -121,6 +121,19 @@ static irqreturn_t psmouse_interrupt(struct serio *serio,
if (psmouse->state == PSMOUSE_IGNORE) if (psmouse->state == PSMOUSE_IGNORE)
goto out; goto out;
if (flags & (SERIO_PARITY|SERIO_TIMEOUT)) {
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;
}
if (psmouse->acking) { if (psmouse->acking) {
switch (data) { switch (data) {
case PSMOUSE_RET_ACK: case PSMOUSE_RET_ACK:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment