public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Zhenguo Zhao <zhenguo6858@gmail.com>
Cc: jirislaby@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] tty: n_gsm: delete SABM command frame as requester
Date: Wed, 21 Jul 2021 12:23:57 +0200	[thread overview]
Message-ID: <YPf1vb9fnvDDSSro@kroah.com> (raw)
In-Reply-To: <1625138840-22974-1-git-send-email-zhenguo6858@gmail.com>

On Thu, Jul 01, 2021 at 07:27:20PM +0800, Zhenguo Zhao wrote:
> From: Zhenguo Zhao <Zhenguo.Zhao1@unisoc.com>
> 
> as initiator,it need to send SABM command ,as requester,there is
> no need to send the SABM control frame,it will cause redundant data.

Same issue here with this text.  Please work on fixing it up to be
understood by others better.

> 
> Signed-off-by: Zhenguo Zhao <Zhenguo.Zhao1@unisoc.com>
> ---
>  drivers/tty/n_gsm.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
> index 5fea02c..41a6501 100644
> --- a/drivers/tty/n_gsm.c
> +++ b/drivers/tty/n_gsm.c
> @@ -2997,6 +2997,7 @@ static int gsmtty_open(struct tty_struct *tty, struct file *filp)
>  {
>  	struct gsm_dlci *dlci = tty->driver_data;
>  	struct tty_port *port = &dlci->port;
> +	struct gsm_mux *gsm = dlci->gsm;
>  
>  	port->count++;
>  	tty_port_tty_set(port, tty);
> @@ -3005,8 +3006,9 @@ static int gsmtty_open(struct tty_struct *tty, struct file *filp)
>  	/* We could in theory open and close before we wait - eg if we get
>  	   a DM straight back. This is ok as that will have caused a hangup */
>  	tty_port_set_initialized(port, 1);
> -	/* Start sending off SABM messages */
> -	gsm_dlci_begin_open(dlci);
> +	/* Start sending off SABM messages for initiator */
> +	if (gsm->initiator)
> +		gsm_dlci_begin_open(dlci);

Why is this only an issue for initiators?  And why has no one reported
this problem before now?

Do you not also need to make ths same change somewhere else when
shutting down?

thanks,

greg k-h

      parent reply	other threads:[~2021-07-21 10:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-01 11:27 [PATCH v2] tty: n_gsm: delete SABM command frame as requester Zhenguo Zhao
2021-07-01 11:34 ` Greg KH
2021-07-21 10:23 ` Greg KH [this message]

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=YPf1vb9fnvDDSSro@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zhenguo6858@gmail.com \
    /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