[Top][All Lists]

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

[Qemu-devel] [PATCH arm-devs v1 1/1] cadence_uart: Flush queued characte

From: Peter Crosthwaite
Subject: [Qemu-devel] [PATCH arm-devs v1 1/1] cadence_uart: Flush queued characters on reset
Date: Wed, 3 Apr 2013 14:52:21 +1000

Reset can be used to empty the rx-fifo. As the fifo full condition is
used to return false from can_receive, queued rx data should be flushed
on reset accordingly.

Cc: Wendy Liang <address@hidden>
Cc: Jason Wu <address@hidden>

Signed-off-by: Peter Crosthwaite <address@hidden>
Reported-by: Jason Wu <address@hidden>

 hw/cadence_uart.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/hw/cadence_uart.c b/hw/cadence_uart.c
index 5426f10..421ec99 100644
--- a/hw/cadence_uart.c
+++ b/hw/cadence_uart.c
@@ -157,6 +157,7 @@ static void uart_rx_reset(UartState *s)
     s->rx_wpos = 0;
     s->rx_count = 0;
+    qemu_chr_accept_input(s->chr);
     s->r[R_SR] |= UART_SR_INTR_REMPTY;
     s->r[R_SR] &= ~UART_SR_INTR_RFUL;

reply via email to

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