Skip to content

Commit c9d87f4

Browse files
jwrdegoedegregkh
authored andcommitted
Input: atkbd - do not skip atkbd_deactivate() when skipping ATKBD_CMD_GETID
commit 9cf6e24c9fbf17e52de9fff07f12be7565ea6d61 upstream. After commit 936e4d49ecbc ("Input: atkbd - skip ATKBD_CMD_GETID in translated mode") not only the getid command is skipped, but also the de-activating of the keyboard at the end of atkbd_probe(), potentially re-introducing the problem fixed by commit be2d7e4 ("Input: atkbd - fix multi-byte scancode handling on reconnect"). Make sure multi-byte scancode handling on reconnect is still handled correctly by not skipping the atkbd_deactivate() call. Fixes: 936e4d49ecbc ("Input: atkbd - skip ATKBD_CMD_GETID in translated mode") Tested-by: Paul Menzel <[email protected]> Signed-off-by: Hans de Goede <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]> Signed-off-by: Wang Hai <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 2b0931e commit c9d87f4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/input/keyboard/atkbd.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -807,7 +807,7 @@ static int atkbd_probe(struct atkbd *atkbd)
807807

808808
if (atkbd_skip_getid(atkbd)) {
809809
atkbd->id = 0xab83;
810-
return 0;
810+
goto deactivate_kbd;
811811
}
812812

813813
/*
@@ -844,6 +844,7 @@ static int atkbd_probe(struct atkbd *atkbd)
844844
return -1;
845845
}
846846

847+
deactivate_kbd:
847848
/*
848849
* Make sure nothing is coming from the keyboard and disturbs our
849850
* internal state.

0 commit comments

Comments
 (0)