Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- From d75df61eefa8f59e7f40c4c9a3e02e9a7d9cf130 Mon Sep 17 00:00:00 2001
- From: Arne Hasselbring <[email protected]>
- Date: Wed, 4 Jul 2012 19:25:23 +0200
- Subject: [PATCH] =?UTF-8?q?kbc:=20m=C3=B6gliche=20Endlosschleife=20gefixt?=
- MIME-Version: 1.0
- Content-Type: text/plain; charset=UTF-8
- Content-Transfer-Encoding: 8bit
- ! Wenn in send_kbc_command kein 0xfa (ACK), sondern 0xfe (Resend) zurück-
- kommt, hätte es eine Endlosschleife gegeben.
- Signed-off-by: Arne Hasselbring <[email protected]>
- ---
- src/modules/kbc/keyboard.c | 11 ++++++-----
- 1 Datei geändert, 6 Zeilen hinzugefügt(+), 5 Zeilen entfernt(-)
- diff --git a/src/modules/kbc/keyboard.c b/src/modules/kbc/keyboard.c
- index bfacf01..4fdaadc 100644
- --- a/src/modules/kbc/keyboard.c
- +++ b/src/modules/kbc/keyboard.c
- @@ -85,11 +85,12 @@ static void send_key_event(uint8_t keycode, bool release);
- */
- static void send_kbd_command(uint8_t command)
- {
- - while (inb(0x64) & 0x2) {
- - yield();
- - }
- - outb(0x60, command);
- - while (inb(0x60) != 0xfa);
- + do {
- + while (inb(0x64) & 0x2) {
- + yield();
- + }
- + outb(0x60, command);
- + } while (inb(0x60) == 0xfe);
- }
- --
- 1.7.11.1
Advertisement
Add Comment
Please, Sign In to add comment