Skip to content

Commit

Permalink
drivers/tty/hvc/hvc_tile.c: properly return -EAGAIN
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Chris Metcalf committed May 11, 2015
1 parent 5bf6c07 commit b4287df
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/tty/hvc/hvc_tile.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down

0 comments on commit b4287df

Please sign in to comment.