aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/hvc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tty/hvc')
-rw-r--r--drivers/tty/hvc/hvc_console.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/tty/hvc/hvc_console.c b/drivers/tty/hvc/hvc_console.c
index f8ff6f50fc35..59000750cc73 100644
--- a/drivers/tty/hvc/hvc_console.c
+++ b/drivers/tty/hvc/hvc_console.c
@@ -163,8 +163,10 @@ static void hvc_console_print(struct console *co, const char *b,
163 } else { 163 } else {
164 r = cons_ops[index]->put_chars(vtermnos[index], c, i); 164 r = cons_ops[index]->put_chars(vtermnos[index], c, i);
165 if (r <= 0) { 165 if (r <= 0) {
166 /* throw away chars on error */ 166 /* throw away characters on error
167 i = 0; 167 * but spin in case of -EAGAIN */
168 if (r != -EAGAIN)
169 i = 0;
168 } else if (r > 0) { 170 } else if (r > 0) {
169 i -= r; 171 i -= r;
170 if (i > 0) 172 if (i > 0)
@@ -448,7 +450,7 @@ static int hvc_push(struct hvc_struct *hp)
448 450
449 n = hp->ops->put_chars(hp->vtermno, hp->outbuf, hp->n_outbuf); 451 n = hp->ops->put_chars(hp->vtermno, hp->outbuf, hp->n_outbuf);
450 if (n <= 0) { 452 if (n <= 0) {
451 if (n == 0) { 453 if (n == 0 || n == -EAGAIN) {
452 hp->do_wakeup = 1; 454 hp->do_wakeup = 1;
453 return 0; 455 return 0;
454 } 456 }