serial: update LSR on enabling/disabling FIFOs
commit023c3a9707d0d9259a1e858cdf7804dd10973fca
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 11 Dec 2014 18:08:14 +0000 (11 19:08 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 15 Dec 2014 16:34:05 +0000 (15 17:34 +0100)
tree9689ebaa5e2618469db9a0d66eee21159ecf06e0
parent0d931d706266d6ada3bf22d3afca1afdc8d12fa9
serial: update LSR on enabling/disabling FIFOs

When the transmit FIFO is emptied or enabled, the transmitter
hold register is empty.  When it is disabled, it is also emptied and
in addition the previous contents of the transmitter hold register
are discarded.  In either case, the THRE bit in LSR must be set and
THRI raised.

When the receive FIFO is emptied or enabled, the data ready and break
bits must be cleared in LSR.  Likewise when the receive FIFO is disabled.

Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/char/serial.c