summaryrefslogtreecommitdiffstats
path: root/hw/serial.c
diff options
context:
space:
mode:
authorAnthony Liguori2012-04-01 21:18:30 +0200
committerAnthony Liguori2012-04-02 16:43:17 +0200
commitdfe844c9043815497b6472bfaf470b0f8d2e7312 (patch)
tree4e1cdbdd1e1b3650f7edb2e5e68e50f55cb579f7 /hw/serial.c
parentserial: fix retry logic (diff)
downloadqemu-dfe844c9043815497b6472bfaf470b0f8d2e7312.tar.gz
qemu-dfe844c9043815497b6472bfaf470b0f8d2e7312.tar.xz
qemu-dfe844c9043815497b6472bfaf470b0f8d2e7312.zip
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>
Diffstat (limited to 'hw/serial.c')
-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;
}
}