aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-05-15 12:44:22 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-05-15 12:44:22 -0400
commit55e4b8b416849753bd7eacd1f2ac3947fcf1c78e (patch)
treeb00cc75f291a837475da07b60dec589d565dcd91 /drivers/tty/serial
parentbdb595b4a906b8124d0dc5ff852f84302e2e7955 (diff)
Revert "serial_core: Update buffer overrun statistics."
This reverts commit 642180871bc91afebb6ccf40d1615a7dd33699a3. 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 <alan@linux.intel.com> Cc: Corbin Atkinson <corbinat@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial')
-rw-r--r--drivers/tty/serial/serial_core.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
index a21dc8e3b7c0..246b823c1b27 100644
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
@@ -2527,16 +2527,14 @@ void uart_insert_char(struct uart_port *port, unsigned int status,
2527 struct tty_struct *tty = port->state->port.tty; 2527 struct tty_struct *tty = port->state->port.tty;
2528 2528
2529 if ((status & port->ignore_status_mask & ~overrun) == 0) 2529 if ((status & port->ignore_status_mask & ~overrun) == 0)
2530 if (tty_insert_flip_char(tty, ch, flag) == 0) 2530 tty_insert_flip_char(tty, ch, flag);
2531 ++port->icount.buf_overrun;
2532 2531
2533 /* 2532 /*
2534 * Overrun is special. Since it's reported immediately, 2533 * Overrun is special. Since it's reported immediately,
2535 * it doesn't affect the current character. 2534 * it doesn't affect the current character.
2536 */ 2535 */
2537 if (status & ~port->ignore_status_mask & overrun) 2536 if (status & ~port->ignore_status_mask & overrun)
2538 if (tty_insert_flip_char(tty, 0, TTY_OVERRUN) == 0) 2537 tty_insert_flip_char(tty, 0, TTY_OVERRUN);
2539 ++port->icount.buf_overrun;
2540} 2538}
2541EXPORT_SYMBOL_GPL(uart_insert_char); 2539EXPORT_SYMBOL_GPL(uart_insert_char);
2542 2540