linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Eric Bénard" <eric@eukrea.com>
To: linux-serial@vger.kernel.org
Cc: alan@lxorguk.ukuu.org.uk, mirq@rere.qmqm.pl,
	"Eric Bénard" <eric@eukrea.com>
Subject: [PATCH v2 2/2] n_gsm: fix UIH control byte : P bit should be 0
Date: Tue,  8 Mar 2011 22:15:54 +0100	[thread overview]
Message-ID: <1299618954-4742-2-git-send-email-eric@eukrea.com> (raw)
In-Reply-To: <1299618954-4742-1-git-send-email-eric@eukrea.com>

* the GSM 07.10 specification says in 5.4.3.1 that
'both stations shall set the P bit to 0'
  thanks to Alan Cox for finding this explanation in the spec

* without this fix, on Telit & Sim.com modems, opening a new DLC
randomly fails. Not setting PF bit of the control byte gives a
reliable behaviour on these modems.

Signed-off-by: Eric Bénard <eric@eukrea.com>
---
v2 : updated patch and comment following Alan's review

 drivers/tty/n_gsm.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
index aa2e5d3..6613918 100644
--- a/drivers/tty/n_gsm.c
+++ b/drivers/tty/n_gsm.c
@@ -1250,8 +1250,7 @@ static void gsm_control_response(struct gsm_mux *gsm, unsigned int command,
 
 static void gsm_control_transmit(struct gsm_mux *gsm, struct gsm_control *ctrl)
 {
-	struct gsm_msg *msg = gsm_data_alloc(gsm, 0, ctrl->len + 1,
-							gsm->ftype|PF);
+	struct gsm_msg *msg = gsm_data_alloc(gsm, 0, ctrl->len + 1, gsm->ftype);
 	if (msg == NULL)
 		return;
 	msg->data[0] = (ctrl->cmd << 1) | 2 | EA;	/* command */
-- 
1.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2011-03-08 21:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-08  0:24 [PATCH 1/2] n_gsm: improve behaviour with encoding 0 Eric Bénard
2011-03-08  0:24 ` [PATCH 2/2] n_gsm: add a documentation Eric Bénard
2011-03-08  0:27   ` Eric Bénard
2011-03-08 12:52     ` Alan Cox
2011-03-08 12:34   ` Michał Mirosław
2011-03-08 13:01 ` [PATCH 1/2] n_gsm: improve behaviour with encoding 0 Alan Cox
2011-03-08 16:16   ` Eric Bénard
2011-03-08 19:52     ` Alan Cox
2011-03-08 21:15   ` [PATCH v2 1/2] n_gsm: add a documentation Eric Bénard
2011-03-08 21:15     ` Eric Bénard [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=1299618954-4742-2-git-send-email-eric@eukrea.com \
    --to=eric@eukrea.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-serial@vger.kernel.org \
    --cc=mirq@rere.qmqm.pl \
    /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).