linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] n_gsm: improve behaviour with encoding 0
@ 2011-03-08  0:24 Eric Bénard
  2011-03-08  0:24 ` [PATCH 2/2] n_gsm: add a documentation Eric Bénard
  2011-03-08 13:01 ` [PATCH 1/2] n_gsm: improve behaviour with encoding 0 Alan Cox
  0 siblings, 2 replies; 10+ messages in thread
From: Eric Bénard @ 2011-03-08  0:24 UTC (permalink / raw)
  To: linux-serial; +Cc: alan, Eric Bénard

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

* note that the detailed documentation of CMUX for both these
modems doesn't set this bit when sending the UIH frame with the
MSC command :
http://www.telit.com/module/infopool/download.php?id=616
http://wm.sim.com/sim/News/photo/2010721161442.pdf

Signed-off-by: Eric Bénard <eric@eukrea.com>
---
 drivers/tty/n_gsm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
index 9a71b57..38efedb 100644
--- a/drivers/tty/n_gsm.c
+++ b/drivers/tty/n_gsm.c
@@ -1251,7 +1251,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);
+					gsm->ftype|(gsm->encoding ? PF : 0));
 	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

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-03-08 23:02 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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     ` [PATCH v2 2/2] n_gsm: fix UIH control byte : P bit should be 0 Eric Bénard

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).