]> git.baikalelectronics.ru Git - kernel.git/commit
mxser: keep only !tty test in ISR
authorJiri Slaby <jslaby@suse.cz>
Thu, 18 Nov 2021 07:31:09 +0000 (08:31 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Nov 2021 17:33:21 +0000 (18:33 +0100)
commit0c0cea0643bcc0841fff0d959ee5a5529a503d4d
treefbac3a27afca9de2a87acffde069854766b6161e
parentaa8c22aad216d09b64faa8bd8d09279f5d98ec4f
mxser: keep only !tty test in ISR

The others are superfluous with tty refcounting in place now. And they
are racy in fact:
* tty_port_initialized() reports false for a small moment after
  interrupts are enabled.
* closing is 1 while the port is still alive.

The queues are flushed later during close anyway. So there is no need
for this special handling. Actually, the ISR should not flush the
queues. It should behave as every other driver, just queue the chars
into tty buffer and go on. But this will be changed later. There is
still a lot code depending on having tty in ISR (and not only tty_port).

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20211118073125.12283-4-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/mxser.c