diff mbox

hw/char/cmsdk-apb-uart.c: Accept more input after character read

Message ID CAEg67GkRTw=cXei3o9hvpxG_L4zSrNzR0bFyAgny+sSEUb_kPw@mail.gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Patrick Oppenlander April 19, 2018, 11:50 p.m. UTC
The character frontend needs to be notified that the uart receive buffer
is empty and ready to handle another character.

Previously, the uart only worked correctly when receiving one character
at a time.

Signed-off-by: Patrick Oppenlander <patrick.oppenlander@gmail.com>
---
 hw/char/cmsdk-apb-uart.c | 1 +
 1 file changed, 1 insertion(+)

         r = s->state;

Comments

Peter Maydell May 3, 2018, 12:54 p.m. UTC | #1
On 20 April 2018 at 00:50, Patrick Oppenlander
<patrick.oppenlander@gmail.com> wrote:
> The character frontend needs to be notified that the uart receive buffer
> is empty and ready to handle another character.
>
> Previously, the uart only worked correctly when receiving one character
> at a time.
>
> Signed-off-by: Patrick Oppenlander <patrick.oppenlander@gmail.com>
> ---
>  hw/char/cmsdk-apb-uart.c | 1 +
>  1 file changed, 1 insertion(+)

Oops. Thanks for the patch, applied to target-arm.next.

-- PMM
diff mbox

Patch

diff --git a/hw/char/cmsdk-apb-uart.c b/hw/char/cmsdk-apb-uart.c
index 9c0929d8a2..ddfbb25c24 100644
--- a/hw/char/cmsdk-apb-uart.c
+++ b/hw/char/cmsdk-apb-uart.c
@@ -157,6 +157,7 @@  static uint64_t uart_read(void *opaque, hwaddr
offset, unsigned size)
         r = s->rxbuf;
         s->state &= ~R_STATE_RXFULL_MASK;
         cmsdk_apb_uart_update(s);
+        qemu_chr_fe_accept_input(&s->chr);
         break;
     case A_STATE: