Commit 2ea9c236 authored by Marcos Paulo de Souza's avatar Marcos Paulo de Souza Committed by Dmitry Torokhov

Input: i8042 - add dbg msg when a command can't write its parameter

This can happen in cases like bug #102951[1], so add a proper debug msg
as done in wait_read. Also, change wait_read debug message to differ from
wait_write.

[1] https://bugzilla.kernel.org/show_bug.cgi?id=102951Signed-off-by: default avatarMarcos Paulo de Souza <marcos.souza.org@gmail.com>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent a5e5da2b
...@@ -312,8 +312,10 @@ static int __i8042_command(unsigned char *param, int command) ...@@ -312,8 +312,10 @@ static int __i8042_command(unsigned char *param, int command)
for (i = 0; i < ((command >> 12) & 0xf); i++) { for (i = 0; i < ((command >> 12) & 0xf); i++) {
error = i8042_wait_write(); error = i8042_wait_write();
if (error) if (error) {
dbg(" -- i8042 (wait write timeout)\n");
return error; return error;
}
dbg("%02x -> i8042 (parameter)\n", param[i]); dbg("%02x -> i8042 (parameter)\n", param[i]);
i8042_write_data(param[i]); i8042_write_data(param[i]);
} }
...@@ -321,7 +323,7 @@ static int __i8042_command(unsigned char *param, int command) ...@@ -321,7 +323,7 @@ static int __i8042_command(unsigned char *param, int command)
for (i = 0; i < ((command >> 8) & 0xf); i++) { for (i = 0; i < ((command >> 8) & 0xf); i++) {
error = i8042_wait_read(); error = i8042_wait_read();
if (error) { if (error) {
dbg(" -- i8042 (timeout)\n"); dbg(" -- i8042 (wait read timeout)\n");
return error; return error;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment