All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] jsm: fixing termios structure to be compatible with stty application
@ 2009-09-30 16:18 leitao
  2009-09-30 20:31 ` Alan Cox
  0 siblings, 1 reply; 4+ messages in thread
From: leitao @ 2009-09-30 16:18 UTC (permalink / raw)
  To: linux-kernel

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


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

end of thread, other threads:[~2009-10-01 21:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-30 16:18 [PATCH] jsm: fixing termios structure to be compatible with stty application leitao
2009-09-30 20:31 ` Alan Cox
2009-10-01 20:34   ` Breno Leitao
2009-10-01 21:10     ` Alan Cox

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.