Skip to content

Commit 4f79409

Browse files
jk-ozlabsgregkh
authored andcommitted
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent c685af1 commit 4f79409

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/tty/serial/serial_core.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1786,6 +1786,8 @@ static void uart_line_info(struct seq_file *m, struct uart_driver *drv, int i)
17861786
seq_printf(m, " brk:%d", uport->icount.brk);
17871787
if (uport->icount.overrun)
17881788
seq_printf(m, " oe:%d", uport->icount.overrun);
1789+
if (uport->icount.buf_overrun)
1790+
seq_printf(m, " bo:%d", uport->icount.buf_overrun);
17891791

17901792
#define INFOBIT(bit, str) \
17911793
if (uport->mctrl & (bit)) \

0 commit comments

Comments
 (0)