From: Lars Poeschel <poeschel@lemonage.de>
To: gregkh@linuxfoundation.org, jslaby@suse.cz, linux-kernel@vger.kernel.org
Subject: [RFC DO NOT MERGE] tty: n_gsm: support buggy modem
Date: Tue, 07 Jan 2014 14:05:26 +0100 [thread overview]
Message-ID: <4386658.RncifLMAGy@lem-wkst-02> (raw)
From: Lars Poeschel <poeschel@lemonage.de>
This is obiviously a bad patch. Do not merge it!
I have a GSM Modem (Quectel M95 Revision: M95AR01A11) that I have a problem
with when using the n_gsm mux line discipline. After attaching the line
discipline and opening a muxed channel, the open never returns. The
problem is that the tty code waits for the TIOCM_CD flag to be set. According
to the 3GPP TS 07.10 specification the modem can set this virtual flag by
setting the DV bit in it's modem status control message. My modem sends the
modem status command, but this DV bit is not set. With this patch the modem
and the whole mux is working fine. Another way makeing all this work is
setting the carrier_raised function to NULL. The tty code assumes that
everything is alright then.
My question is: What could be the best way to support this modem in mailine
kernel ? I do not see a way to detect this buggy modem inside the line
discipline and use this patch's method as a work around then. But the
detection would only be possible using AT command before the line discipline
is attached or using the muxed channel after the mux is set up.
Thanks,
Lars
---
diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
index c0f76da..a1a6f57 100644
--- a/drivers/tty/n_gsm.c
+++ b/drivers/tty/n_gsm.c
@@ -1061,6 +1061,7 @@ static void gsm_process_modem(struct tty_struct *tty, struct gsm_dlci *dlci,
mlines |= TIOCM_RI;
if (modem & MDM_DV)
mlines |= TIOCM_CD;
+ mlines |= TIOCM_CD;
/* Carrier drop -> hangup */
if (tty) {
next reply other threads:[~2014-01-07 13:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-07 13:05 Lars Poeschel [this message]
2014-01-07 14:20 ` Greg KH
2014-01-07 16:51 ` Alan Cox
2014-01-08 13:26 ` Lars Poeschel
2014-01-07 16:58 ` Lars Poeschel
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=4386658.RncifLMAGy@lem-wkst-02 \
--to=poeschel@lemonage.de \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.cz \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®