qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2] cadence_uart: Handle backend tx errors
@ 2013-06-19 14:20 edgar.iglesias
  2013-06-20  0:06 ` Peter Crosthwaite
  0 siblings, 1 reply; 2+ messages in thread
From: edgar.iglesias @ 2013-06-19 14:20 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.crosthwaite

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-06-20  0:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-19 14:20 [Qemu-devel] [PATCH v2] cadence_uart: Handle backend tx errors edgar.iglesias
2013-06-20  0:06 ` Peter Crosthwaite

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).