linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* tty: n_gsm: fix closing multiplexer mode
@ 2017-05-22  8:14 Sascha Hauer
  2017-05-22  8:14 ` [PATCH 1/2] tty: n_gsm: do not send/receive in ldisc close path Sascha Hauer
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Sascha Hauer @ 2017-05-22  8:14 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, Jiri Slaby, Alan Cox, kernel

Properly closing the n_gsm multiplexer mode is currently not possible.
n_gsm used to send the disconnect command frame in the ttys close
path, but in recent kernels it's no longer possible to do so.

To fix this, remove the sending of disconnect frames from the n_gsm
close path. This means that the modem is still in multiplexing mode
though, so this may lead to problems while re-opening the modem later.
Document the possibilities we have to close the connection in the
Documentation/serial/n_gsm.txt document.

One possibility to close the multiplexing mode is to manually send a
disconnect frame before initialising multiplex mode. Since it's not so
nice that userspace has to know the layout of a disconnect frame,
the second patch introduces a disconnect ioctl which can be issued
right before closing the physical port during the first session.
This ioctl is only useful when during the second session it is known
the the first session has been closed properly, so I'm not sure
how useful it is to introduce such an ioctl.

Sascha

----------------------------------------------------------------
Sascha Hauer (2):
      tty: n_gsm: do not send/receive in ldisc close path
      tty: n_gsm: Add GSMIOC_DISCONNECT ioctl to disconnect the multiplexer

 Documentation/serial/n_gsm.txt | 13 ++++++++++
 drivers/tty/n_gsm.c            | 56 ++++++++++++++++++++++++++++--------------
 include/uapi/linux/gsmmux.h    |  1 +
 3 files changed, 51 insertions(+), 19 deletions(-)

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-05-23  7:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-22  8:14 tty: n_gsm: fix closing multiplexer mode Sascha Hauer
2017-05-22  8:14 ` [PATCH 1/2] tty: n_gsm: do not send/receive in ldisc close path Sascha Hauer
2017-05-22  8:15 ` [PATCH 2/2] tty: n_gsm: Add GSMIOC_DISCONNECT ioctl to disconnect the multiplexer Sascha Hauer
2017-05-22  9:25   ` Greg Kroah-Hartman
2017-05-22  9:29     ` Sascha Hauer
2017-05-22 18:16 ` tty: n_gsm: fix closing multiplexer mode Alan Cox
2017-05-23  7:55   ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).