Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tty: mxser: drop low-latency workaround

Commit 67d2bc58afdd ("Char: mxser_new, fix recursive locking") worked
around the infamous low_latency behaviour of tty_flip_buffer_push() by
simply dropping and reacquiring the port lock in the interrupt handler.

Since commit a9c3f68f3cd8 ("tty: Fix low_latency BUG"),
tty_flip_buffer_push() always schedules a work item to push data to the
line discipline and there's no need to keep any low_latency hacks around.

Link: https://lore.kernel.org/lkml/3018694794025219@wsc.cz/T/#m06b04c640a7b6f41afb3d34a4cf29b1df4935d3a
Reviewed-by: Jiri Slaby <jirislaby@kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20210421095509.3024-2-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Johan Hovold and committed by
Greg Kroah-Hartman
02ca144f e2a5e844

-7
-7
drivers/tty/mxser.c
··· 2155 2155 port->mon_data.rxcnt += cnt; 2156 2156 port->mon_data.up_rxcnt += cnt; 2157 2157 2158 - /* 2159 - * We are called from an interrupt context with &port->slock 2160 - * being held. Drop it temporarily in order to prevent 2161 - * recursive locking. 2162 - */ 2163 - spin_unlock(&port->slock); 2164 2158 tty_flip_buffer_push(&port->port); 2165 - spin_lock(&port->slock); 2166 2159 } 2167 2160 2168 2161 static void mxser_transmit_chars(struct tty_struct *tty, struct mxser_port *port)