Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1646592

tty: n_gsm: fix closing multiplexer mode

From Sascha Hauer <s.hauer@pengutronix.de>
Newsgroups linux.kernel
Subject tty: n_gsm: fix closing multiplexer mode
Date 2017-05-22 10:20 +0200
Message-ID <tJQJk-31p-3@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


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(-)

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

tty: n_gsm: fix closing multiplexer mode Sascha Hauer <s.hauer@pengutronix.de> - 2017-05-22 10:20 +0200
  [PATCH 1/2] tty: n_gsm: do not send/receive in ldisc close path Sascha Hauer <s.hauer@pengutronix.de> - 2017-05-22 10:20 +0200
  [PATCH 2/2] tty: n_gsm: Add GSMIOC_DISCONNECT ioctl to disconnect the multiplexer Sascha Hauer <s.hauer@pengutronix.de> - 2017-05-22 10:20 +0200
    Re: [PATCH 2/2] tty: n_gsm: Add GSMIOC_DISCONNECT ioctl to  disconnect the multiplexer Sascha Hauer <s.hauer@pengutronix.de> - 2017-05-22 11:30 +0200
    Re: [PATCH 2/2] tty: n_gsm: Add GSMIOC_DISCONNECT ioctl to  disconnect the multiplexer Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-22 11:30 +0200
  Re: tty: n_gsm: fix closing multiplexer mode Alan Cox <gnomes@lxorguk.ukuu.org.uk> - 2017-05-22 20:20 +0200
    Re: tty: n_gsm: fix closing multiplexer mode Sascha Hauer <s.hauer@pengutronix.de> - 2017-05-23 10:00 +0200

csiph-web