summaryrefslogtreecommitdiffstats
path: root/drivers/tty/hvc
diff options
context:
space:
mode:
authorChris Metcalf <cmetcalf@ezchip.com>2015-05-04 17:25:12 -0400
committerChris Metcalf <cmetcalf@ezchip.com>2015-05-11 11:22:20 -0400
commitb4287df82991ca608f44d7ac12ad9b3bc39d5baa (patch)
treeea4d20b3e8971dd6526b366cbfa2fb1770bfd277 /drivers/tty/hvc
parent5bf6c07a1843813d0065feaaecba622d49148d7e (diff)
downloadtalos-obmc-linux-b4287df82991ca608f44d7ac12ad9b3bc39d5baa.tar.gz
talos-obmc-linux-b4287df82991ca608f44d7ac12ad9b3bc39d5baa.zip
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>
Diffstat (limited to 'drivers/tty/hvc')
-rw-r--r--drivers/tty/hvc/hvc_tile.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/tty/hvc/hvc_tile.c b/drivers/tty/hvc/hvc_tile.c
index 3f6cd3102db5..9da1e842bbe9 100644
--- a/drivers/tty/hvc/hvc_tile.c
+++ b/drivers/tty/hvc/hvc_tile.c
@@ -51,7 +51,8 @@ int tile_console_write(const char *buf, int count)
_SIM_CONTROL_OPERATOR_BITS));
return 0;
} else {
- return hv_console_write((HV_VirtAddr)buf, count);
+ /* Translate 0 bytes written to EAGAIN for hvc_console_print. */
+ return hv_console_write((HV_VirtAddr)buf, count) ?: -EAGAIN;
}
}
OpenPOWER on IntegriCloud