projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9dd6f30
)
mxser: increase buf_overrun if tty_insert_flip_char() fails
author
Jiri Slaby
<jslaby@suse.cz>
Thu, 18 Nov 2021 07:31:22 +0000
(08:31 +0100)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Thu, 25 Nov 2021 17:33:22 +0000
(18:33 +0100)
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>
drivers/tty/mxser.c
patch
|
blob
|
history
diff --git
a/drivers/tty/mxser.c
b/drivers/tty/mxser.c
index 10862d4bb8857100b388b9be044f5a541d884254..65ea4baee5eb2e3a412f9b1d87b34e42c8221eed 100644
(file)
--- a/
drivers/tty/mxser.c
+++ b/
drivers/tty/mxser.c
@@
-1507,7
+1507,8
@@
static bool mxser_receive_chars_new(struct mxser_port *port, u8 status)
while (gdl--) {
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;
@@
-1553,8
+1554,10
@@
static u8 mxser_receive_chars_old(struct tty_struct *tty,
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;
+ }
}
if (hwid)