|
@@ -163,8 +163,10 @@ static void hvc_console_print(struct console *co, const char *b,
|
|
|
} else {
|
|
|
r = cons_ops[index]->put_chars(vtermnos[index], c, i);
|
|
|
if (r <= 0) {
|
|
|
- /* throw away chars on error */
|
|
|
- i = 0;
|
|
|
+ /* throw away characters on error
|
|
|
+ * but spin in case of -EAGAIN */
|
|
|
+ if (r != -EAGAIN)
|
|
|
+ i = 0;
|
|
|
} else if (r > 0) {
|
|
|
i -= r;
|
|
|
if (i > 0)
|
|
@@ -448,7 +450,7 @@ static int hvc_push(struct hvc_struct *hp)
|
|
|
|
|
|
n = hp->ops->put_chars(hp->vtermno, hp->outbuf, hp->n_outbuf);
|
|
|
if (n <= 0) {
|
|
|
- if (n == 0) {
|
|
|
+ if (n == 0 || n == -EAGAIN) {
|
|
|
hp->do_wakeup = 1;
|
|
|
return 0;
|
|
|
}
|