Skip to content

Commit

Permalink
[SERIAL] Remove unconditional enable of TX irq for console
Browse files Browse the repository at this point in the history
A bug report from Gerd Hoffmann has highlighted that unconditionally
enabling the transmit interrupt at the end of console writes is very
bad.

In Gerd's case, it causes the test for buggy UARTs to give false
positives, incorrectly identifying ports as buggy when they are not.

Moreover, if we unconditionally enable the interrupt, and the port
is sharing it's interrupt with other ports, there is the very real
possibility that we'll cause an interrupt storm.  (Not all ports use
OUT2 as an interrupt mask.)

Hence, revert part of f91a371 and
all of f5968b3 until a better solution
can be found.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Russell King authored and Russell King committed Apr 30, 2006
1 parent b32b19b commit a88d75b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/serial/8250.c
Original file line number Diff line number Diff line change
Expand Up @@ -2256,8 +2256,7 @@ serial8250_console_write(struct console *co, const char *s, unsigned int count)
* 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);
}

static int serial8250_console_setup(struct console *co, char *options)
Expand Down

0 comments on commit a88d75b

Please sign in to comment.