qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 2/2] serial: clear LSR.TEMT when populating the TSR


From: Anthony Liguori
Subject: [Qemu-devel] [PATCH 2/2] serial: clear LSR.TEMT when populating the TSR
Date: Mon, 2 Apr 2012 09:39:39 -0500

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 <address@hidden>
---
 hw/serial.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/hw/serial.c b/hw/serial.c
index b499bca..a421d1e 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;
         }
     }
 
-- 
1.7.5.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]