[patch 08/13] psmouse: workaround for Sunrex mouse

From: Dmitry Torokhov
Date: Sun May 29 2005 - 00:12:07 EST


From: Vojtech Pavlik <vojtech@xxxxxxx>

Input: Workaround for Sunrex K8561 IR Keyboard/Mouse. The mouse
sends an incorrect ID and wasn't recognized.

Reported-by: Stefan Seyfried <seife@xxxxxxx>
Signed-off-by: Vojtech Pavlik <vojtech@xxxxxxx>
Signed-off-by: Dmitry Torokhov <dtor@xxxxxxx>
---

drivers/input/mouse/psmouse-base.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletion(-)

Index: work/drivers/input/mouse/psmouse-base.c
===================================================================
--- work.orig/drivers/input/mouse/psmouse-base.c
+++ work/drivers/input/mouse/psmouse-base.c
@@ -518,13 +518,16 @@ static int psmouse_probe(struct psmouse
/*
* First, we check if it's a mouse. It should send 0x00 or 0x03
* in case of an IntelliMouse in 4-byte mode or 0x04 for IM Explorer.
+ * Sunrex K8561 IR Keyboard/Mouse reports 0xff on second and subsequent
+ * ID queries, probably due to a firmware bug.
*/

param[0] = 0xa5;
if (ps2_command(ps2dev, param, PSMOUSE_CMD_GETID))
return -1;

- if (param[0] != 0x00 && param[0] != 0x03 && param[0] != 0x04)
+ if (param[0] != 0x00 && param[0] != 0x03 &&
+ param[0] != 0x04 && param[0] != 0xff)
return -1;

/*

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/