cadence_uart: Handle backend tx errors
authorEdgar E. Iglesias <edgar.iglesias@gmail.com>
Tue, 18 Jun 2013 07:22:55 +0000 (09:22 +0200)
committerEdgar E. Iglesias <edgar.iglesias@gmail.com>
Mon, 24 Jun 2013 14:26:52 +0000 (16:26 +0200)
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
hw/char/cadence_uart.c

index c2a783430b5c62c70493c41488324d3100ccd3ca..205e125de98bbba6900f9101184be61c690d561a 100644 (file)
@@ -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)