From patchwork Wed Sep 25 18:59:24 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Walle X-Patchwork-Id: 277961 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 10DDD2C0246 for ; Thu, 26 Sep 2013 05:02:50 +1000 (EST) Received: from localhost ([::1]:54353 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOuMJ-0002eJ-UF for incoming@patchwork.ozlabs.org; Wed, 25 Sep 2013 15:02:47 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35345) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOuJk-0000ZN-36 for qemu-devel@nongnu.org; Wed, 25 Sep 2013 15:00:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VOuJe-0008Lq-Na for qemu-devel@nongnu.org; Wed, 25 Sep 2013 15:00:08 -0400 Received: from ssl.serverraum.org ([88.198.40.39]:50191) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOuJe-0008Kc-IB for qemu-devel@nongnu.org; Wed, 25 Sep 2013 15:00:02 -0400 Received: from localhost (localhost [127.0.0.1]) by ssl.serverraum.org (Postfix) with ESMTP id DB4D33F09A; Wed, 25 Sep 2013 21:00:01 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at ssl.serverraum.org Received: from ssl.serverraum.org ([127.0.0.1]) by localhost (ssl.serverraum.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8HFc6BvlLGUO; Wed, 25 Sep 2013 21:00:01 +0200 (CEST) Received: from thanatos.fritz.box (88-134-163-112-dynip.superkabel.de [88.134.163.112]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id 58DB43F079; Wed, 25 Sep 2013 21:00:01 +0200 (CEST) From: Michael Walle To: qemu-devel@nongnu.org Date: Wed, 25 Sep 2013 20:59:24 +0200 Message-Id: <1380135572-25095-4-git-send-email-michael@walle.cc> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1380135572-25095-1-git-send-email-michael@walle.cc> References: <1380135572-25095-1-git-send-email-michael@walle.cc> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 88.198.40.39 Cc: Michael Walle , Antony Pavlov Subject: [Qemu-devel] [PULL 03/11] milkymist-uart: use qemu_chr_fe_write_all() instead of qemu_chr_fe_write() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 --- 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 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;