public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alan Cox <gnomes@lxorguk.ukuu.org.uk>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: linux-kernel@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jslaby@suse.com>,
	kernel@pengutronix.de
Subject: Re: tty: n_gsm: fix closing multiplexer mode
Date: Mon, 22 May 2017 19:16:17 +0100	[thread overview]
Message-ID: <20170522191617.35dd508f@alans-desktop> (raw)
In-Reply-To: <20170522081500.21335-1-s.hauer@pengutronix.de>

> 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.

I don't think it justifies an ioctl and the likely use case is that the
tty is hung up when the process dies so would already be in N_TTY at the
point anyone tried to clean up.

A more interesting question - and I don't have enough hardware to test
this any more - would be whether we can safely send that sequence if our
initial connects failed a few times so we try disconnect/reconnect.

Alan

  parent reply	other threads:[~2017-05-22 18:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Alan Cox [this message]
2017-05-23  7:55   ` tty: n_gsm: fix closing multiplexer mode Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170522191617.35dd508f@alans-desktop \
    --to=gnomes@lxorguk.ukuu.org.uk \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=s.hauer@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox