Skip to content

Commit

Permalink
drivers/kbd: fix initialization flush loop
Browse files Browse the repository at this point in the history
Use Status Register port instead of Data port.

Signed-off-by: Pawel Wieczorkiewicz <[email protected]>
  • Loading branch information
wipawel committed Aug 12, 2021
1 parent 367eb55 commit 5e9d0c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/keyboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ void init_keyboard(uint8_t dst_cpus) {
outb(KEYBOARD_PORT_CMD, KEYBOARD_CMD_DISABLE_PORT_2);

/* Flush output buffer */
while (inb(KEYBOARD_PORT_DATA) & KEYBOARD_STATUS_OUT_FULL)
while (inb(KEYBOARD_PORT_CMD) & KEYBOARD_STATUS_OUT_FULL)
; /* discard leftover bytes */

/* Controller configuration */
Expand Down

0 comments on commit 5e9d0c7

Please sign in to comment.