[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210514214422.3019105-1-nathanl@linux.ibm.com>
Date: Fri, 14 May 2021 16:44:22 -0500
From: Nathan Lynch <nathanl@...ux.ibm.com>
To: linuxppc-dev@...ts.ozlabs.org
Cc: mpe@...erman.id.au, linux-kernel@...r.kernel.org,
gregkh@...uxfoundation.org, jirislaby@...nel.org
Subject: [PATCH] powerpc/udbg_hvc: retry putc on -EAGAIN
hvterm_raw_put_chars() calls hvc_put_chars(), which may return -EAGAIN
when the underlying hcall returns a "busy" status, but udbg_hvc_putc()
doesn't handle this. When using xmon on a PowerVM guest, this can
result in incomplete or garbled output when printing relatively large
amounts of data quickly, such as when dumping the kernel log buffer.
Call again on -EAGAIN.
Signed-off-by: Nathan Lynch <nathanl@...ux.ibm.com>
---
drivers/tty/hvc/hvc_vio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/hvc/hvc_vio.c b/drivers/tty/hvc/hvc_vio.c
index 798f27f40cc2..76d2a7038095 100644
--- a/drivers/tty/hvc/hvc_vio.c
+++ b/drivers/tty/hvc/hvc_vio.c
@@ -249,7 +249,7 @@ static void udbg_hvc_putc(char c)
count = hvterm_hvsi_put_chars(0, &c, 1);
break;
}
- } while(count == 0);
+ } while(count == 0 || count == -EAGAIN);
}
static int udbg_hvc_getc_poll(void)
--
2.30.2
Powered by blists - more mailing lists