提交 b2c623a3 编写于 作者: A Antony Pavlov 提交者: Michael Walle

milkymist-uart: use qemu_chr_fe_write_all() instead of qemu_chr_fe_write()

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: NPeter Crosthwaite <peter.crosthwaite@xilinx.com>
Acked-by: NPeter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: NAntony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: NMichael Walle <michael@walle.cc>
Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
上级 f40c49ac
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册