linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: daniel.starke@siemens.com
Cc: linux-serial@vger.kernel.org, jirislaby@kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] tty: n_gsm: fix encoding of control signal octet bit DV
Date: Thu, 17 Feb 2022 10:56:42 +0100	[thread overview]
Message-ID: <Yg4b2hks0/LglHK5@kroah.com> (raw)
In-Reply-To: <20220217080555.5387-1-daniel.starke@siemens.com>

On Thu, Feb 17, 2022 at 12:05:49AM -0800, daniel.starke@siemens.com wrote:
> n_gsm is based on the 3GPP 07.010 and its newer version is the 3GPP 27.010.
> See https://portal.3gpp.org/desktopmodules/Specifications/SpecificationDetails.aspx?specificationId=1516
> The changes from 07.010 to 27.010 are non-functional. Therefore, I refer to
> the newer 27.010 here. Chapter 5.4.6.3.7 describes the encoding of the
> control signal octet used by the MSC (modem status command). The same
> encoding is also used in convergence layer type 2 as described in chapter
> 5.5.2. Table 7 and 24 both require the DV (data valid) bit to be set 1 for
> outgoing control signal octets sent by the DTE (data terminal equipment),
> i.e. for the initiator side.
> Currently, the DV bit is only set if CD (carrier detect) is on, regardless
> of the side.
> 
> This patch fixes this behavior by setting the DV bit on the initiator side
> unconditionally.
> 
> Fixes: e1eaea46bb40 ("tty: n_gsm line discipline")
> Cc: stable@vger.kernel.org
> Signed-off-by: Daniel Starke <daniel.starke@siemens.com>
> ---
>  drivers/tty/n_gsm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
> index 0b1808e3a912..e199315a158e 100644
> --- a/drivers/tty/n_gsm.c
> +++ b/drivers/tty/n_gsm.c
> @@ -439,7 +439,7 @@ static u8 gsm_encode_modem(const struct gsm_dlci *dlci)
>  		modembits |= MDM_RTR;
>  	if (dlci->modem_tx & TIOCM_RI)
>  		modembits |= MDM_IC;
> -	if (dlci->modem_tx & TIOCM_CD)
> +	if (dlci->modem_tx & TIOCM_CD || dlci->gsm->initiator)
>  		modembits |= MDM_DV;
>  	return modembits;
>  }
> -- 
> 2.25.1
> 

All of these are patch 1/1, which is odd :(

Please renumber them properly and resend.

thanks,

greg k-h

  parent reply	other threads:[~2022-02-17  9:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-17  8:05 [PATCH 1/1] tty: n_gsm: fix encoding of control signal octet bit DV daniel.starke
2022-02-17  8:05 ` [PATCH 1/1] tty: n_gsm: fix encoding of command/response bit daniel.starke
2022-02-17  8:05 ` [PATCH 1/1] tty: n_gsm: fix proper link termination after failed open daniel.starke
2022-02-17  8:05 ` [PATCH 1/1] tty: n_gsm: fix NULL pointer access due to DLCI release daniel.starke
2022-02-17  8:05 ` [PATCH 1/1] tty: n_gsm: fix wrong tty control line for flow control daniel.starke
2022-02-17  8:05 ` [PATCH 1/1] tty: n_gsm: fix wrong modem processing in convergence layer type 2 daniel.starke
2022-02-17  8:05 ` [PATCH 1/1] tty: n_gsm: fix deadlock in gsmtty_open() daniel.starke
2022-02-17  9:56 ` Greg KH [this message]
2022-02-17 10:45 [PATCH 1/1] tty: n_gsm: fix encoding of control signal octet bit DV Starke, Daniel
2022-02-17 12:27 ` Greg KH
2022-02-17 14:03 Starke, Daniel
2022-02-17 14:50 ` Greg KH

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=Yg4b2hks0/LglHK5@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=daniel.starke@siemens.com \
    --cc=jirislaby@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).