Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3ca5de6dd4ec5a139b2b8f00dce3e4726ca91af1
Commit:     3ca5de6dd4ec5a139b2b8f00dce3e4726ca91af1
Parent:     62b529a7b9c11880a8820494a25db0e2ecdf3bed
Author:     Dmitry Torokhov <[EMAIL PROTECTED]>
AuthorDate: Wed Mar 7 23:20:55 2007 -0500
Committer:  Dmitry Torokhov <[EMAIL PROTECTED]>
CommitDate: Wed Mar 7 23:20:55 2007 -0500

    Input: i8042 - another attempt to fix AUX delivery checks
    
    Do not assume that AUX_LOOP command is broken unless it
    completes successfully but returns wrong (unexpected) data.
    
    Signed-off-by: Dmitry Torokhov <[EMAIL PROTECTED]>
---
 drivers/input/serio/i8042.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
index ec195a3..db9cca3 100644
--- a/drivers/input/serio/i8042.c
+++ b/drivers/input/serio/i8042.c
@@ -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
@@ -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;
        }
 
 /*
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to