From: leitao@linux.vnet.ibm.com
To: linux-kernel@vger.kernel.org
Subject: [PATCH] jsm: fixing termios structure to be compatible with stty application
Date: Wed, 30 Sep 2009 12:18:32 -0400 [thread overview]
Message-ID: <1254327512-6880-1-git-send-email-leitao@linux.vnet.ibm.com> (raw)
Currently stty returns "unable to perform all requested operations",
when it changes the speed of a jsm device.
It was happening because c_ispeed and c_ospeed were not set properly.
This patch just set them, so that when stty compare the requested
and the new mode(struct termios), they are the same.
Signed-off-by: Breno Leitão <leitao@linux.vnet.ibm.com>
---
drivers/serial/jsm/jsm_tty.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/drivers/serial/jsm/jsm_tty.c b/drivers/serial/jsm/jsm_tty.c
index 00f4577..dd1ed76 100644
--- a/drivers/serial/jsm/jsm_tty.c
+++ b/drivers/serial/jsm/jsm_tty.c
@@ -321,6 +321,10 @@ static void jsm_tty_set_termios(struct uart_port *port,
channel->ch_bd->bd_ops->param(channel);
jsm_carrier(channel);
+
+ termios->c_ispeed = termios->c_cflag & CBAUD;
+ termios->c_ospeed = termios->c_cflag & CBAUD;
+
spin_unlock_irqrestore(&port->lock, lock_flags);
}
--
1.6.0.2
next reply other threads:[~2009-09-30 16:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-30 16:18 leitao [this message]
2009-09-30 20:31 ` [PATCH] jsm: fixing termios structure to be compatible with stty application Alan Cox
2009-10-01 20:34 ` Breno Leitao
2009-10-01 21:10 ` Alan Cox
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=1254327512-6880-1-git-send-email-leitao@linux.vnet.ibm.com \
--to=leitao@linux.vnet.ibm.com \
--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