]> git.baikalelectronics.ru Git - kernel.git/commit
tty: n_gsm: do not send/receive in ldisc close path
authorSascha Hauer <s.hauer@pengutronix.de>
Wed, 31 May 2017 06:19:05 +0000 (08:19 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 3 Jun 2017 09:48:52 +0000 (18:48 +0900)
commit75460836a6565d8da3216e48e5bebcfa58988dbe
tree20a4d97d4ba762851fb33c61597d8efaa0371a60
parenta35d9f68a6e403399761af25e1ebf6f19e480d02
tty: n_gsm: do not send/receive in ldisc close path

gsm_cleanup_mux() is called in the line discipline close path which
is called at tty_release() time. At this stage the tty is no longer
operational enough to send any frames. Sending close frames is
therefore not possible and waiting for their answers always times
out.

This patch removes sending close messages and waiting for their answers
from the tty_release path.

This patch makes explicit what previously implicitly had been the case
already: We are not able to tell the modem that we are about to close
the multiplexer on our side. This means the modem will stay in
multiplexer mode and re-establishing the multiplexer later fails. The
only way for userspace to work around this is to manually send a close
frame in N_TTY mode after closing the mux.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Documentation/serial/n_gsm.txt
drivers/tty/n_gsm.c