提交 55e4b8b4 编写于 作者: G Greg Kroah-Hartman

Revert "serial_core: Update buffer overrun statistics."

This reverts commit 64218087.

Buffer overruns are for hardware reported overruns, not software ones,
which will only happen if we run out of memory and you will get lots of
-ENOMEM errors at the same time.

Thanks to Alan Cox for catching this.
Reported-by: NAlan Cox <alan@linux.intel.com>
Cc: Corbin Atkinson <corbinat@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 bdb595b4
...@@ -2527,16 +2527,14 @@ void uart_insert_char(struct uart_port *port, unsigned int status, ...@@ -2527,16 +2527,14 @@ void uart_insert_char(struct uart_port *port, unsigned int status,
struct tty_struct *tty = port->state->port.tty; struct tty_struct *tty = port->state->port.tty;
if ((status & port->ignore_status_mask & ~overrun) == 0) if ((status & port->ignore_status_mask & ~overrun) == 0)
if (tty_insert_flip_char(tty, ch, flag) == 0) tty_insert_flip_char(tty, ch, flag);
++port->icount.buf_overrun;
/* /*
* Overrun is special. Since it's reported immediately, * Overrun is special. Since it's reported immediately,
* it doesn't affect the current character. * it doesn't affect the current character.
*/ */
if (status & ~port->ignore_status_mask & overrun) if (status & ~port->ignore_status_mask & overrun)
if (tty_insert_flip_char(tty, 0, TTY_OVERRUN) == 0) tty_insert_flip_char(tty, 0, TTY_OVERRUN);
++port->icount.buf_overrun;
} }
EXPORT_SYMBOL_GPL(uart_insert_char); EXPORT_SYMBOL_GPL(uart_insert_char);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册