Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drivers/tty/hvc/hvc_tile.c: properly return -EAGAIN

We were returning zero if no bytes could be written to the Tilera
hypervisor console device, but this causes the output to be truncated.
By returning -EAGAIN the tty hvc driver will come back and try again,
which gives the semantics we want, and avoids dropping console output.

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Chris Metcalf <cmetcalf@ezchip.com>

+2 -1
+2 -1
drivers/tty/hvc/hvc_tile.c
··· 51 51 _SIM_CONTROL_OPERATOR_BITS)); 52 52 return 0; 53 53 } else { 54 - return hv_console_write((HV_VirtAddr)buf, count); 54 + /* Translate 0 bytes written to EAGAIN for hvc_console_print. */ 55 + return hv_console_write((HV_VirtAddr)buf, count) ?: -EAGAIN; 55 56 } 56 57 } 57 58