Skip to contentSkip to conversation

8250: Serial console enable Tx fix

PATCH In review Michael Hordijk 2 participants 2 messages May 27, 2006 – Jun 2, 2006 TTY layer and serial drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 8250: Serial console enable Tx fix

Enabling the Tx interrupt from console_write on buggy UART (UART_BUG_TXEN)
breaks console transmit on said UART. Revert to previous UART_IER restore and use serial8250_start_tx() to cause the transmit path to start and not hang.

drivers/serial/8250.c 2006-05-26 21:26:54.000841539 -0400 renamed from drivers/serial/8250.c.orig 2006-05-26 21:25:09.000116360 -0400 +7 -2
@@ -2229,8 +2229,13 @@ serial8250_console_write(struct console
         *      and restore the IER
         */
        wait_for_xmitr(up, BOTH_EMPTY);
-       up->ier |= UART_IER_THRI;
-       serial_out(up, UART_IER, ier | UART_IER_THRI);
+       serial_out(up, UART_IER, ier);
+
+       /*
+        *      Start transmitting again in case it was clobbered racing between
+        *      console and tty output.
+        */
+       serial8250_start_tx(up);
 }
 
 static int serial8250_console_setup(struct console *co, char *options)
#1 lore raw
Quoted 4 lines · Michael Hordijk

Enabling the Tx interrupt from console_write on buggy UART (UART_BUG_TXEN) breaks console transmit on said UART. Revert to previous
UART_IER restore and use serial8250_start_tx() to cause the transmit path to start and not hang.

Please look at how this got solved in the 2.6.17-rc kernels and implement the same fix. Enabling the transmitter at the end of every console write is just plain buggy and asking for problems.

Signature · 3 lines
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core