mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
Revert "serial_core: Update buffer overrun statistics."
This reverts commit 642180871b.
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: Alan Cox <[email protected]>
Cc: Corbin Atkinson <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
bdb595b4a9
commit
55e4b8b416
1 changed files with 2 additions and 4 deletions
|
|
@ -2527,16 +2527,14 @@ void uart_insert_char(struct uart_port *port, unsigned int status,
|
|||
struct tty_struct *tty = port->state->port.tty;
|
||||
|
||||
if ((status & port->ignore_status_mask & ~overrun) == 0)
|
||||
if (tty_insert_flip_char(tty, ch, flag) == 0)
|
||||
++port->icount.buf_overrun;
|
||||
tty_insert_flip_char(tty, ch, flag);
|
||||
|
||||
/*
|
||||
* Overrun is special. Since it's reported immediately,
|
||||
* it doesn't affect the current character.
|
||||
*/
|
||||
if (status & ~port->ignore_status_mask & overrun)
|
||||
if (tty_insert_flip_char(tty, 0, TTY_OVERRUN) == 0)
|
||||
++port->icount.buf_overrun;
|
||||
tty_insert_flip_char(tty, 0, TTY_OVERRUN);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(uart_insert_char);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue