Patchwork [for-1.4] cadance_uart: Accept input after rx FIFO pop

login
register
mail settings
Submitter Peter Crosthwaite
Date Feb. 12, 2013, 1:29 a.m.
Message ID <1360632571-25638-1-git-send-email-peter.crosthwaite@xilinx.com>
Download mbox | patch
Permalink /patch/219716/
State New
Headers show

Comments

Peter Crosthwaite - Feb. 12, 2013, 1:29 a.m.
The device returns false from the can receive function when the FIFO is
full. This means the device should check for buffered input whenever a byte is
popped from the FIFO.

Reported-by: Jason Wu <huanyu@xilinx.com>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
---
 hw/cadence_uart.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
Anthony Liguori - Feb. 18, 2013, 4:02 p.m.
Applied.  Thanks.

Regards,

Anthony Liguori

Patch

diff --git a/hw/cadence_uart.c b/hw/cadence_uart.c
index cf2f53c..5766d38 100644
--- a/hw/cadence_uart.c
+++ b/hw/cadence_uart.c
@@ -343,6 +343,7 @@  static void uart_read_rx_fifo(UartState *s, uint32_t *c)
         if (!s->rx_count) {
             s->r[R_SR] |= UART_SR_INTR_REMPTY;
         }
+        qemu_chr_accept_input(s->chr);
     } else {
         *c = 0;
         s->r[R_SR] |= UART_SR_INTR_REMPTY;