]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
milkymist-uart: use qemu_chr_fe_write_all() instead of qemu_chr_fe_write()
authorAntony Pavlov <antonynpavlov@gmail.com>
Sat, 31 Aug 2013 17:22:39 +0000 (21:22 +0400)
committerMichael Walle <michael@walle.cc>
Tue, 4 Feb 2014 18:34:29 +0000 (19:34 +0100)
qemu_chr_fe_write() is capable of returning 0
to indicate EAGAIN (and friends) and we don't
handle this.

Just change it to qemu_chr_fe_write_all() to fix.

Reported-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Acked-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
hw/char/milkymist-uart.c

index 2c52a0fa8e2ccb0c4aff6d2cca73a6d2d9ceac3b..da51f82eaccb5eab3ffd6c1bae48bb46e11b7250 100644 (file)
@@ -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;