summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2012-04-01 14:18:30 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2012-04-02 09:43:17 -0500
commitdfe844c9043815497b6472bfaf470b0f8d2e7312 (patch)
tree4e1cdbdd1e1b3650f7edb2e5e68e50f55cb579f7
parent67c5322d7000fd105a926eec44bc1765b7d70bdd (diff)
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 <aliguori@us.ibm.com>
-rw-r--r--hw/serial.c1
1 files changed, 1 insertions, 0 deletions
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;
}
}