mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-09 14:43:16 +00:00
mxser: increase buf_overrun if tty_insert_flip_char() fails
mxser doesn't increase port->icount.buf_overrun at all. Do so if overrun happens, so that it can be read from the stats. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Link: https://lore.kernel.org/r/20211118073125.12283-17-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
9dd6f3063a
commit
eb68ac0462
@ -1507,7 +1507,8 @@ static bool mxser_receive_chars_new(struct mxser_port *port, u8 status)
|
|||||||
|
|
||||||
while (gdl--) {
|
while (gdl--) {
|
||||||
u8 ch = inb(port->ioaddr + UART_RX);
|
u8 ch = inb(port->ioaddr + UART_RX);
|
||||||
tty_insert_flip_char(&port->port, ch, 0);
|
if (!tty_insert_flip_char(&port->port, ch, 0))
|
||||||
|
port->icount.buf_overrun++;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -1553,9 +1554,11 @@ static u8 mxser_receive_chars_old(struct tty_struct *tty,
|
|||||||
port->icount.overrun++;
|
port->icount.overrun++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!tty_insert_flip_char(&port->port, ch, flag))
|
if (!tty_insert_flip_char(&port->port, ch, flag)) {
|
||||||
|
port->icount.buf_overrun++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (hwid)
|
if (hwid)
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user