qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: edgar.iglesias@gmail.com
To: qemu-devel@nongnu.org
Cc: peter.crosthwaite@xilinx.com
Subject: [Qemu-devel] [PATCH v2] cadence_uart: Handle backend tx errors
Date: Wed, 19 Jun 2013 16:20:28 +0200	[thread overview]
Message-ID: <1371651629-31262-1-git-send-email-edgar.iglesias@gmail.com> (raw)

From: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
---

v1 -> v2:
Remove loop around qemu_chr_fe_write_all, it does not return short writes.

 hw/char/cadence_uart.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/hw/char/cadence_uart.c b/hw/char/cadence_uart.c
index c2a7834..205e125 100644
--- a/hw/char/cadence_uart.c
+++ b/hw/char/cadence_uart.c
@@ -297,9 +297,7 @@ static void uart_write_tx_fifo(UartState *s, const uint8_t *buf, int size)
         return;
     }
 
-    while (size) {
-        size -= qemu_chr_fe_write(s->chr, buf, size);
-    }
+    qemu_chr_fe_write_all(s->chr, buf, size);
 }
 
 static void uart_receive(void *opaque, const uint8_t *buf, int size)
-- 
1.7.10.4

             reply	other threads:[~2013-06-19 14:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-19 14:20 edgar.iglesias [this message]
2013-06-20  0:06 ` [Qemu-devel] [PATCH v2] cadence_uart: Handle backend tx errors Peter Crosthwaite

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1371651629-31262-1-git-send-email-edgar.iglesias@gmail.com \
    --to=edgar.iglesias@gmail.com \
    --cc=peter.crosthwaite@xilinx.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).