diff options
author | Jiri Kosina <jkosina@suse.cz> | 2008-06-17 11:47:27 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2008-06-17 11:47:27 -0400 |
commit | 2f6a77d56523c14651236bc401a99b0e2aca2fdd (patch) | |
tree | 3697ee2c0525a6e4455327afcaaa7935c0d4dac0 /drivers/input | |
parent | efd5184646d5d400fc538d093e9a0bec22a75551 (diff) |
Input: i8042 - retry failed CTR writes when resuming
There are systems that fail in i8042_resume() with
i8042: Can't write CTR to resume
as i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR) fails even though the
controller claimed itself to be ready before.
One retry after failing write fixes the problems on the failing systems.
Reported-by: Helmut Schaa <hschaa@novell.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/serio/i8042.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c index 592ff55b62d0..170f71ee5772 100644 --- a/drivers/input/serio/i8042.c +++ b/drivers/input/serio/i8042.c | |||
@@ -952,8 +952,12 @@ static int i8042_resume(struct platform_device *dev) | |||
952 | i8042_ctr |= I8042_CTR_AUXDIS | I8042_CTR_KBDDIS; | 952 | i8042_ctr |= I8042_CTR_AUXDIS | I8042_CTR_KBDDIS; |
953 | i8042_ctr &= ~(I8042_CTR_AUXINT | I8042_CTR_KBDINT); | 953 | i8042_ctr &= ~(I8042_CTR_AUXINT | I8042_CTR_KBDINT); |
954 | if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) { | 954 | if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) { |
955 | printk(KERN_ERR "i8042: Can't write CTR to resume\n"); | 955 | printk(KERN_WARNING "i8042: Can't write CTR to resume, retrying...\n"); |
956 | return -EIO; | 956 | msleep(50); |
957 | if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) { | ||
958 | printk(KERN_ERR "i8042: CTR write retry failed\n"); | ||
959 | return -EIO; | ||
960 | } | ||
957 | } | 961 | } |
958 | 962 | ||
959 | 963 | ||