diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-11-06 02:00:48 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-11-06 02:00:48 -0500 |
commit | 02cee68998010c4a2cc2383c86babc2ecc737183 (patch) | |
tree | 13c6483472f672c3b2570b075ed2ad4fd4c5405e /drivers/input/serio | |
parent | f5ba35023697e54a24487bcd822194390a333893 (diff) | |
parent | b419148e567728f6af0c3b01965c1cc141e3e13a (diff) |
Merge commit 'v2.6.32-rc6' into next
Diffstat (limited to 'drivers/input/serio')
-rw-r--r-- | drivers/input/serio/i8042-x86ia64io.h | 13 | ||||
-rw-r--r-- | drivers/input/serio/i8042.c | 35 |
2 files changed, 40 insertions, 8 deletions
diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h index a39bc4eb902b..a537925f7651 100644 --- a/drivers/input/serio/i8042-x86ia64io.h +++ b/drivers/input/serio/i8042-x86ia64io.h | |||
@@ -327,6 +327,17 @@ static struct dmi_system_id __initdata i8042_dmi_nomux_table[] = { | |||
327 | }, | 327 | }, |
328 | }, | 328 | }, |
329 | { | 329 | { |
330 | /* | ||
331 | * Reset and GET ID commands issued via KBD port are | ||
332 | * sometimes being delivered to AUX3. | ||
333 | */ | ||
334 | .ident = "Sony Vaio FZ-240E", | ||
335 | .matches = { | ||
336 | DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"), | ||
337 | DMI_MATCH(DMI_PRODUCT_NAME, "VGN-FZ240E"), | ||
338 | }, | ||
339 | }, | ||
340 | { | ||
330 | .ident = "Amoi M636/A737", | 341 | .ident = "Amoi M636/A737", |
331 | .matches = { | 342 | .matches = { |
332 | DMI_MATCH(DMI_SYS_VENDOR, "Amoi Electronics CO.,LTD."), | 343 | DMI_MATCH(DMI_SYS_VENDOR, "Amoi Electronics CO.,LTD."), |
@@ -661,7 +672,7 @@ static void i8042_pnp_exit(void) | |||
661 | static int __init i8042_pnp_init(void) | 672 | static int __init i8042_pnp_init(void) |
662 | { | 673 | { |
663 | char kbd_irq_str[4] = { 0 }, aux_irq_str[4] = { 0 }; | 674 | char kbd_irq_str[4] = { 0 }, aux_irq_str[4] = { 0 }; |
664 | int pnp_data_busted = false; | 675 | bool pnp_data_busted = false; |
665 | int err; | 676 | int err; |
666 | 677 | ||
667 | #ifdef CONFIG_X86 | 678 | #ifdef CONFIG_X86 |
diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c index a31578170ccc..1df02d25aca5 100644 --- a/drivers/input/serio/i8042.c +++ b/drivers/input/serio/i8042.c | |||
@@ -836,17 +836,32 @@ static int i8042_controller_selftest(void) | |||
836 | static int i8042_controller_init(void) | 836 | static int i8042_controller_init(void) |
837 | { | 837 | { |
838 | unsigned long flags; | 838 | unsigned long flags; |
839 | int n = 0; | ||
840 | unsigned char ctr[2]; | ||
839 | 841 | ||
840 | /* | 842 | /* |
841 | * Save the CTR for restoral on unload / reboot. | 843 | * Save the CTR for restore on unload / reboot. |
842 | */ | 844 | */ |
843 | 845 | ||
844 | if (i8042_command(&i8042_ctr, I8042_CMD_CTL_RCTR)) { | 846 | do { |
845 | printk(KERN_ERR "i8042.c: Can't read CTR while initializing i8042.\n"); | 847 | if (n >= 10) { |
846 | return -EIO; | 848 | printk(KERN_ERR |
847 | } | 849 | "i8042.c: Unable to get stable CTR read.\n"); |
850 | return -EIO; | ||
851 | } | ||
852 | |||
853 | if (n != 0) | ||
854 | udelay(50); | ||
855 | |||
856 | if (i8042_command(&ctr[n++ % 2], I8042_CMD_CTL_RCTR)) { | ||
857 | printk(KERN_ERR | ||
858 | "i8042.c: Can't read CTR while initializing i8042.\n"); | ||
859 | return -EIO; | ||
860 | } | ||
848 | 861 | ||
849 | i8042_initial_ctr = i8042_ctr; | 862 | } while (n < 2 || ctr[0] != ctr[1]); |
863 | |||
864 | i8042_initial_ctr = i8042_ctr = ctr[0]; | ||
850 | 865 | ||
851 | /* | 866 | /* |
852 | * Disable the keyboard interface and interrupt. | 867 | * Disable the keyboard interface and interrupt. |
@@ -895,6 +910,12 @@ static int i8042_controller_init(void) | |||
895 | return -EIO; | 910 | return -EIO; |
896 | } | 911 | } |
897 | 912 | ||
913 | /* | ||
914 | * Flush whatever accumulated while we were disabling keyboard port. | ||
915 | */ | ||
916 | |||
917 | i8042_flush(); | ||
918 | |||
898 | return 0; | 919 | return 0; |
899 | } | 920 | } |
900 | 921 | ||
@@ -914,7 +935,7 @@ static void i8042_controller_reset(void) | |||
914 | i8042_ctr |= I8042_CTR_KBDDIS | I8042_CTR_AUXDIS; | 935 | i8042_ctr |= I8042_CTR_KBDDIS | I8042_CTR_AUXDIS; |
915 | i8042_ctr &= ~(I8042_CTR_KBDINT | I8042_CTR_AUXINT); | 936 | i8042_ctr &= ~(I8042_CTR_KBDINT | I8042_CTR_AUXINT); |
916 | 937 | ||
917 | if (i8042_command(&i8042_initial_ctr, I8042_CMD_CTL_WCTR)) | 938 | if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) |
918 | printk(KERN_WARNING "i8042.c: Can't write CTR while resetting.\n"); | 939 | printk(KERN_WARNING "i8042.c: Can't write CTR while resetting.\n"); |
919 | 940 | ||
920 | /* | 941 | /* |