From dfe844c9043815497b6472bfaf470b0f8d2e7312 Mon Sep 17 00:00:00 2001 From: Anthony Liguori Date: Sun, 1 Apr 2012 14:18:30 -0500 Subject: [PATCH] serial: clear LSR.TEMT when populating the TSR We never actually clear the TEMT (transmit sending register empty) flag when populating the TSR. We set the flag, but since it's never cleared, setting it is sort of pointless.. I found this with a unit test case. Signed-off-by: Anthony Liguori --- hw/serial.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/serial.c b/hw/serial.c index b499bca659..a421d1e7bc 100644 --- a/hw/serial.c +++ b/hw/serial.c @@ -332,6 +332,7 @@ static void serial_xmit(void *opaque) } else { s->tsr = s->thr; s->lsr |= UART_LSR_THRE; + s->lsr &= ~UART_LSR_TEMT; } } -- GitLab