aboutsummaryrefslogtreecommitdiff
path: root/hw/char
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2014-08-26 12:16:57 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2014-09-19 10:50:07 +0200
commit4df7961faaa317d57e873ecdec58422d3f979336 (patch)
tree4e02103c99fe79464303d227071044b59d782c79 /hw/char
parent5bde14078d181439a1170094d7774372242ab739 (diff)
serial: reset state at startup
When a serial port is started, its initial state is all zero. Make it consistent with reset state instead. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/char')
-rw-r--r--hw/char/serial.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/char/serial.c b/hw/char/serial.c
index a668249049..847dacc9c4 100644
--- a/hw/char/serial.c
+++ b/hw/char/serial.c
@@ -833,6 +833,7 @@ void serial_realize_core(SerialState *s, Error **errp)
serial_event, s);
fifo8_create(&s->recv_fifo, UART_FIFO_LENGTH);
fifo8_create(&s->xmit_fifo, UART_FIFO_LENGTH);
+ serial_reset(s);
}
void serial_exit_core(SerialState *s)