lkml.org 
[lkml]   [2009]   [Sep]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] jsm: fixing termios structure to be compatible with stty application
Date
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2009-09-30 18:23    [W:0.040 / U:0.932 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site