Received: from eggs.gnu.org ([2001:4830:134:3::10]:37622) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WAlDL-0003Gj-BV for qemu-devel@nongnu.org; Tue, 04 Feb 2014 13:59:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WAlDC-00069F-WB for qemu-devel@nongnu.org; Tue, 04 Feb 2014 13:59:19 -0500 Received: from ssl.serverraum.org ([2a01:4f8:a0:1283::1:2]:55743) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WAlDC-000692-Q2 for qemu-devel@nongnu.org; Tue, 04 Feb 2014 13:59:10 -0500 From: Michael Walle Date: Tue, 4 Feb 2014 19:58:25 +0100 Message-Id: <1391540314-16141-4-git-send-email-michael@walle.cc> In-Reply-To: <1391540314-16141-1-git-send-email-michael@walle.cc> References: <1391540314-16141-1-git-send-email-michael@walle.cc> Subject: [Qemu-devel] [PULL v5 03/12] milkymist-uart: use qemu_chr_fe_write_all() instead of qemu_chr_fe_write() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , Michael Walle , Antony Pavlov , Anthony Liguori From: Antony Pavlov 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 Acked-by: Peter Crosthwaite Signed-off-by: Antony Pavlov Signed-off-by: Michael Walle Reviewed-by: Peter Maydell --- hw/char/milkymist-uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/char/milkymist-uart.c b/hw/char/milkymist-uart.c index 2c52a0f..da51f82 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; -- 1.7.10.4