Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7741e931 authored by Vojtech Pavlik's avatar Vojtech Pavlik Committed by Dmitry Torokhov
Browse files

Input: Workaround for Sunrex K8561 IR Keyboard/Mouse. The mouse


       sends an incorrect ID and wasn't recognized.

Reported-by: default avatarStefan Seyfried <seife@suse.de>
Signed-off-by: default avatarVojtech Pavlik <vojtech@suse.cz>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent 74af42bb
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -518,13 +518,16 @@ static int psmouse_probe(struct psmouse *psmouse)
/*
/*
 * First, we check if it's a mouse. It should send 0x00 or 0x03
 * 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.
 * 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;
	param[0] = 0xa5;
	if (ps2_command(ps2dev, param, PSMOUSE_CMD_GETID))
	if (ps2_command(ps2dev, param, PSMOUSE_CMD_GETID))
		return -1;
		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;
		return -1;


/*
/*