summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2008-06-17 11:47:27 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2008-08-06 10:10:59 -0700
commit5ca597f2c8991e8c706e67df2e361d725aedc49d (patch)
treea29eeeab155a9e261a27f324512c077f44818a7b /drivers
parent66f2a73adbb5d81bebd1b8acb23b9db43640f5d4 (diff)
Input: i8042 - retry failed CTR writes when resuming
commit 2f6a77d56523c14651236bc401a99b0e2aca2fdd upstream 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> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/input/serio/i8042.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
index 65a74cfc187b..f3228ae0cc5f 100644
--- a/drivers/input/serio/i8042.c
+++ b/drivers/input/serio/i8042.c
@@ -938,8 +938,12 @@ static int i8042_resume(struct platform_device *dev)
i8042_ctr |= I8042_CTR_AUXDIS | I8042_CTR_KBDDIS;
i8042_ctr &= ~(I8042_CTR_AUXINT | I8042_CTR_KBDINT);
if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) {
- printk(KERN_ERR "i8042: Can't write CTR to resume\n");
- return -EIO;
+ printk(KERN_WARNING "i8042: Can't write CTR to resume, retrying...\n");
+ msleep(50);
+ if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) {
+ printk(KERN_ERR "i8042: CTR write retry failed\n");
+ return -EIO;
+ }
}
if (i8042_mux_present) {