]> xenbits.xensource.com Git - seabios.git/commitdiff
Fix serial port flushing code.
authorKevin O'Connor <kevin@koconnor.net>
Sat, 9 Jul 2011 22:42:34 +0000 (18:42 -0400)
committerKevin O'Connor <kevin@koconnor.net>
Sun, 10 Jul 2011 19:36:04 +0000 (15:36 -0400)
debug_serial() was doing a full flush while debug_serial_flush() was
only doing a partial flush.  Fix that.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
src/output.c

index 5c91ae5858a5ea037117d50482e91c6031eaed57..462ffb773d9c74f3ffb889ac508f526abe0660df 100644 (file)
@@ -49,7 +49,7 @@ debug_serial(char c)
     if (!CONFIG_DEBUG_SERIAL)
         return;
     int timeout = DEBUG_TIMEOUT;
-    while ((inb(CONFIG_DEBUG_SERIAL_PORT+SEROFF_LSR) & 0x60) != 0x60)
+    while ((inb(CONFIG_DEBUG_SERIAL_PORT+SEROFF_LSR) & 0x20) != 0x20)
         if (!timeout--)
             // Ran out of time.
             return;
@@ -63,7 +63,7 @@ debug_serial_flush(void)
     if (!CONFIG_DEBUG_SERIAL)
         return;
     int timeout = DEBUG_TIMEOUT;
-    while ((inb(CONFIG_DEBUG_SERIAL_PORT+SEROFF_LSR) & 0x40) != 0x40)
+    while ((inb(CONFIG_DEBUG_SERIAL_PORT+SEROFF_LSR) & 0x60) != 0x60)
         if (!timeout--)
             // Ran out of time.
             return;