diff options
author | Jeremy Kerr | 2018-03-21 10:52:38 +0800 |
---|---|---|
committer | Greg Kroah-Hartman | 2018-03-23 16:34:06 +0100 |
commit | 4f794097797f551917b68797e39f25fcb17d5b3a (patch) | |
tree | 0e3744bc26a6170e36de43337d3d3ff1828839a3 /drivers/tty | |
parent | c685af1108d7c303f0b901413405d68eaeac4477 (diff) |
serial: expose buf_overrun count through proc interface
The buf_overrun count is only every written, and not exposed to
userspace anywhere. This means that dropped characters due to flip
buffer overruns are never visible to userspace.
The /proc/tty/driver/serial file exports a bunch of metrics (including
hardware overruns) already, so add the buf_overrun (as "bo:") to this
file.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/serial_core.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c index 35b9201db3b4..0466f9f08a91 100644 --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c @@ -1786,6 +1786,8 @@ static void uart_line_info(struct seq_file *m, struct uart_driver *drv, int i) seq_printf(m, " brk:%d", uport->icount.brk); if (uport->icount.overrun) seq_printf(m, " oe:%d", uport->icount.overrun); + if (uport->icount.buf_overrun) + seq_printf(m, " bo:%d", uport->icount.buf_overrun); #define INFOBIT(bit, str) \ if (uport->mctrl & (bit)) \ |