mirror of https://lore.kernel.org/lkml/
 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]    tty: n_gsm: Fix CR bit value when initiator=0
Date: Wed, 16 Jun 2021 08:19:59 +0200	[thread overview]
Message-ID: <YMmYD3rkS8o+1dXr@kroah.com> (raw)
In-Reply-To: <1623812199-31866-1-git-send-email-zhenguo6858@gmail.com>

On Wed, Jun 16, 2021 at 10:56:39AM +0800, Zhenguo Zhao wrote:
> From: Zhenguo Zhao <zhenguo.zhao1@unisoc.com>
> 
> 	When set initiator=0,switch to Responder,gsmld received dlci SABM/DISC
> 	frame,CR bit should be 0 by calculation.
> 
> 	receive DLC0 SABM CMD:
> 	[69.740263] c1 gsmld_receive: 00000000: f9 03 3f 01 1c f9
> 	[69.893247] c1 gsm_queue cr:1
> 	[69.897629] c1 <-- 0) C: SABM(P)
> 	[69.907516] c1 gsm_queue cr:0

Why is this changelog text indented by tabs?

And I do not understand the changelog text here, what is this showing?
What is wrong here and what is being fixed?

> Signed-off-by: Zhenguo Zhao <zhenguo.zhao1@unisoc.com>

Does this fix a long-standing issue?  Should a "Fixes:" tag go here?  If
so, please provide it.

Should it also be sent to stable kernels?

> ---
>  drivers/tty/n_gsm.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
> index 5fea02c..becca2c 100644
> --- a/drivers/tty/n_gsm.c
> +++ b/drivers/tty/n_gsm.c
> @@ -1779,7 +1779,7 @@ static void gsm_queue(struct gsm_mux *gsm)
>  
>  	switch (gsm->control) {
>  	case SABM|PF:
> -		if (cr == 0)
> +		if (cr == 1)

How did the original code ever work properly?

>  			goto invalid;
>  		if (dlci == NULL)
>  			dlci = gsm_dlci_alloc(gsm, address);
> @@ -1793,7 +1793,7 @@ static void gsm_queue(struct gsm_mux *gsm)
>  		}
>  		break;
>  	case DISC|PF:
> -		if (cr == 0)
> +		if (cr == 1)

Same here, how did this ever work?  Are you sure this change is correct?

thanks,

greg k-h

  reply	other threads:[~2021-06-16  6:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-16  2:56 Zhenguo Zhao
2021-06-16  6:19 ` Greg KH [this message]
2021-06-16  7:29   ` 赵振国
2021-06-16  7:39     ` Greg KH
2021-06-16  7:45       ` Jiri Slaby
2021-06-16  8:01         ` 赵振国

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=YMmYD3rkS8o+1dXr@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

all inboxes | Powered by JetHome®