Message ID | 1377927237-6092-2-git-send-email-antonynpavlov@gmail.com |
---|---|
State | New |
Headers | show |
diff --git a/hw/char/milkymist-uart.c b/hw/char/milkymist-uart.c index 2e4b5c5..6e4bc20 100644 --- a/hw/char/milkymist-uart.c +++ b/hw/char/milkymist-uart.c @@ -124,7 +124,7 @@ static void uart_write(void *opaque, hwaddr addr, uint64_t value, switch (addr) { case R_RXTX: if (s->chr) { - qemu_chr_fe_write(s->chr, &ch, 1); + qemu_chr_fe_write_all(s->chr, &ch, 1); } s->regs[R_STAT] |= STAT_TX_EVT; break;
Here is a quote from the qemu-devel maillist: <quote author="Peter Crosthwaite" url="http://lists.nongnu.org/archive/html/qemu-devel/2013-08/msg04748.html"> qemu_chr_fe_write() is capable of returning 0 to indicate EAGAIN (and friends) and you don't handle this. </quote> Just change it to qemu_chr_fe_write_all() to fix. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> CC: Peter Crosthwaite <peter.crosthwaite@xilinx.com> CC: Michael Walle <michael@walle.cc> --- hw/char/milkymist-uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)