Skip to content

Commit

Permalink
Input: i8042 - another attempt to fix AUX delivery checks
Browse files Browse the repository at this point in the history
Do not assume that AUX_LOOP command is broken unless it
completes successfully but returns wrong (unexpected) data.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
  • Loading branch information
Dmitry Torokhov committed Mar 8, 2007
1 parent 62b529a commit 3ca5de6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions drivers/input/serio/i8042.c
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,8 @@ static int __devinit i8042_check_aux(void)
*/

param = 0x5a;
if (i8042_command(&param, I8042_CMD_AUX_LOOP) || param != 0x5a) {
retval = i8042_command(&param, I8042_CMD_AUX_LOOP);
if (retval || param != 0x5a) {

/*
* External connection test - filters out AT-soldered PS/2 i8042's
Expand All @@ -567,7 +568,12 @@ static int __devinit i8042_check_aux(void)
(param && param != 0xfa && param != 0xff))
return -1;

aux_loop_broken = 1;
/*
* If AUX_LOOP completed without error but returned unexpected data
* mark it as broken
*/
if (!retval)
aux_loop_broken = 1;
}

/*
Expand Down

0 comments on commit 3ca5de6

Please sign in to comment.