From: Greg KH <gregkh@linuxfoundation.org>
To: Daniel Starke <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 SW flow control encoding/handling
Date: Tue, 11 Jan 2022 09:42:49 +0100 [thread overview]
Message-ID: <Yd1DCeajCpJ62zUs@kroah.com> (raw)
In-Reply-To: <20220111072317.2082-1-daniel.starke@siemens.com>
On Mon, Jan 10, 2022 at 11:23:17PM -0800, Daniel Starke wrote:
> According to 3GPP 27.010 chapter 5.2.7.3 DC1 and DC3 (SW flow control)
What is all of that? Do you have a link to the document that this is
and where it says this?
> are to
> be treated according to ISO/IEC 646.
What is "ISO/IEC 646"?
> That means the MSB shall be ignored.
"MSB"? Please spell it out, you have plenty of room here.
> This patch applies the needed changes to handle this correctly.
What changes are needed? Please talk about what you are doing, as the
documentation asks you to so do.
>
> Signed-off-by: Daniel Starke <daniel.starke@siemens.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 0b96b14bbfe1..9ee0643fc9e2 100644
> --- a/drivers/tty/n_gsm.c
> +++ b/drivers/tty/n_gsm.c
> @@ -322,6 +322,7 @@ static int addr_cnt;
> #define GSM1_ESCAPE_BITS 0x20
> #define XON 0x11
> #define XOFF 0x13
> +#define ASCII_MASK 0x7F
Where did "ASCII" come from? You didn't say anything about that in the
changelog.
> static const struct tty_port_operations gsm_port_ops;
>
> @@ -521,7 +522,7 @@ static void gsm_print_packet(const char *hdr, int addr, int cr,
> * @output: output buffer
> * @len: length of input
> *
> - * Expand a buffer by bytestuffing it. The worst case size change
> + * Expand a buffer by byte stuffing it. The worst case size change
This change is not described above, and is totally different and belongs
in a different change.
> * is doubling and the caller is responsible for handing out
> * suitable sized buffers.
> */
> @@ -531,7 +532,8 @@ static int gsm_stuff_frame(const u8 *input, u8 *output, int len)
> int olen = 0;
> while (len--) {
> if (*input == GSM1_SOF || *input == GSM1_ESCAPE
> - || *input == XON || *input == XOFF) {
> + || (*input & ASCII_MASK) == XON
> + || (*input & ASCII_MASK) == XOFF) {
> *output++ = GSM1_ESCAPE;
> *output++ = *input++ ^ GSM1_ESCAPE_BITS;
> olen++;
> --
> 2.25.1
>
What commit does this fix?
Please read the section entitled "The canonical patch format" in the
kernel file, Documentation/SubmittingPatches for a description of how
to do all of this better.
thanks,
greg k-h
next prev parent reply other threads:[~2022-01-11 8:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-11 7:23 Daniel Starke
2022-01-11 8:42 ` Greg KH [this message]
2022-01-11 11:54 Starke, Daniel
2022-01-11 12:05 ` 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=Yd1DCeajCpJ62zUs@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
Powered by JetHome