[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1254327512-6880-1-git-send-email-leitao@linux.vnet.ibm.com>
Date: Wed, 30 Sep 2009 12:18:32 -0400
From: leitao@...ux.vnet.ibm.com
To: linux-kernel@...r.kernel.org
Subject: [PATCH] jsm: fixing termios structure to be compatible with stty application
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@...ux.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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists