]> git.kernelconcepts.de Git - karo-tx-linux.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)
commit71e0779153968c79038a8ed53610d69624115fca
tree20a4d97d4ba762851fb33c61597d8efaa0371a60
parente279e6d98e0cf2c2fe008b3c29042b92f0e17b1d
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