Skip to content

Commit

Permalink
Input: atkbd - do not skip atkbd_deactivate() when skipping ATKBD_CMD…
Browse files Browse the repository at this point in the history
…_GETID

After commit 936e4d4 ("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: 936e4d4 ("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]>
  • Loading branch information
jwrdegoede authored and dtor committed Feb 2, 2024
1 parent 683cd82 commit 9cf6e24
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/input/keyboard/atkbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,7 @@ static int atkbd_probe(struct atkbd *atkbd)

if (atkbd_skip_getid(atkbd)) {
atkbd->id = 0xab83;
return 0;
goto deactivate_kbd;
}

/*
Expand Down Expand Up @@ -863,6 +863,7 @@ static int atkbd_probe(struct atkbd *atkbd)
return -1;
}

deactivate_kbd:
/*
* Make sure nothing is coming from the keyboard and disturbs our
* internal state.
Expand Down

0 comments on commit 9cf6e24

Please sign in to comment.