diff options
Diffstat (limited to 'drivers/input/serio/libps2.c')
-rw-r--r-- | drivers/input/serio/libps2.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/drivers/input/serio/libps2.c b/drivers/input/serio/libps2.c index ed202f2f251a..e0a2297a9d21 100644 --- a/drivers/input/serio/libps2.c +++ b/drivers/input/serio/libps2.c | |||
@@ -35,6 +35,7 @@ EXPORT_SYMBOL(ps2_schedule_command); | |||
35 | EXPORT_SYMBOL(ps2_handle_ack); | 35 | EXPORT_SYMBOL(ps2_handle_ack); |
36 | EXPORT_SYMBOL(ps2_handle_response); | 36 | EXPORT_SYMBOL(ps2_handle_response); |
37 | EXPORT_SYMBOL(ps2_cmd_aborted); | 37 | EXPORT_SYMBOL(ps2_cmd_aborted); |
38 | EXPORT_SYMBOL(ps2_is_keyboard_id); | ||
38 | 39 | ||
39 | /* Work structure to schedule execution of a command */ | 40 | /* Work structure to schedule execution of a command */ |
40 | struct ps2work { | 41 | struct ps2work { |
@@ -102,9 +103,9 @@ void ps2_drain(struct ps2dev *ps2dev, int maxbytes, int timeout) | |||
102 | * known keyboard IDs. | 103 | * known keyboard IDs. |
103 | */ | 104 | */ |
104 | 105 | ||
105 | static inline int ps2_is_keyboard_id(char id_byte) | 106 | int ps2_is_keyboard_id(char id_byte) |
106 | { | 107 | { |
107 | static char keyboard_ids[] = { | 108 | const static char keyboard_ids[] = { |
108 | 0xab, /* Regular keyboards */ | 109 | 0xab, /* Regular keyboards */ |
109 | 0xac, /* NCD Sun keyboard */ | 110 | 0xac, /* NCD Sun keyboard */ |
110 | 0x2b, /* Trust keyboard, translated */ | 111 | 0x2b, /* Trust keyboard, translated */ |
@@ -139,6 +140,19 @@ static int ps2_adjust_timeout(struct ps2dev *ps2dev, int command, int timeout) | |||
139 | 140 | ||
140 | case PS2_CMD_GETID: | 141 | case PS2_CMD_GETID: |
141 | /* | 142 | /* |
143 | * Microsoft Natural Elite keyboard responds to | ||
144 | * the GET ID command as it were a mouse, with | ||
145 | * a single byte. Fail the command so atkbd will | ||
146 | * use alternative probe to detect it. | ||
147 | */ | ||
148 | if (ps2dev->cmdbuf[1] == 0xaa) { | ||
149 | serio_pause_rx(ps2dev->serio); | ||
150 | ps2dev->flags = 0; | ||
151 | serio_continue_rx(ps2dev->serio); | ||
152 | timeout = 0; | ||
153 | } | ||
154 | |||
155 | /* | ||
142 | * If device behind the port is not a keyboard there | 156 | * If device behind the port is not a keyboard there |
143 | * won't be 2nd byte of ID response. | 157 | * won't be 2nd byte of ID response. |
144 | */ | 158 | */ |