aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Jackson <ian.jackson@eu.citrix.com>2009-11-18 11:08:11 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2009-12-18 13:43:48 -0800
commit77e856d7f3de1bfb26f96314ed6e868fe4f38877 (patch)
tree80f79b5e08954fb392defe70d86c1fba91ef3a0d
parent7c52c4436288e1eec78edaca6366658b33fb54e2 (diff)
Serial: Do not read IIR in serial8250_start_tx when UART_BUG_TXEN
commit 68cb4f8e246bbbc649980be0628cae9265870a91 upstream. Do not read IIR in serial8250_start_tx when UART_BUG_TXEN Reading the IIR clears some oustanding interrupts so it is not safe. Instead, simply transmit immediately if the buffer is empty without regard to IIR. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Jiri Kosina <jkosina@suse.cz> Cc: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/serial/8250.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index fb867a9f55e..524f6ab5e05 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -1337,14 +1337,12 @@ static void serial8250_start_tx(struct uart_port *port)
serial_out(up, UART_IER, up->ier);
if (up->bugs & UART_BUG_TXEN) {
- unsigned char lsr, iir;
+ unsigned char lsr;
lsr = serial_in(up, UART_LSR);
up->lsr_saved_flags |= lsr & LSR_SAVE_FLAGS;
- iir = serial_in(up, UART_IIR) & 0x0f;
if ((up->port.type == PORT_RM9000) ?
- (lsr & UART_LSR_THRE &&
- (iir == UART_IIR_NO_INT || iir == UART_IIR_THRI)) :
- (lsr & UART_LSR_TEMT && iir & UART_IIR_NO_INT))
+ (lsr & UART_LSR_THRE) :
+ (lsr & UART_LSR_TEMT))
transmit_chars(up);
}
}