]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/2.6.25.8/fix-tty-speed-handling-on-8250.patch
5.1-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 2.6.25.8 / fix-tty-speed-handling-on-8250.patch
CommitLineData
0d4b8010
GKH
1From e991a2bd4fa0b2f475b67dfe8f33e8ecbdcbb40b Mon Sep 17 00:00:00 2001
2From: Alan Cox <alan@lxorguk.ukuu.org.uk>
3Date: Mon, 28 Apr 2008 02:14:06 -0700
4Subject: Fix tty speed handling on 8250
5
6From: Alan Cox <alan@lxorguk.ukuu.org.uk>
7
8commit e991a2bd4fa0b2f475b67dfe8f33e8ecbdcbb40b upstream.
9
10We try and write the correct speed back but the serial midlayer already
11mangles the speed on us and that means if we request B0 we report back B9600
12when we should not. For now we'll hack around this in the drivers and serial
13code, pending a better long term solution.
14
15Signed-off-by: Alan Cox <alan@redhat.com>
16Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
17Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
18Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
19
20---
21 drivers/serial/8250.c | 4 +++-
22 1 file changed, 3 insertions(+), 1 deletion(-)
23
24--- a/drivers/serial/8250.c
25+++ b/drivers/serial/8250.c
26@@ -2174,7 +2174,9 @@ serial8250_set_termios(struct uart_port
27 }
28 serial8250_set_mctrl(&up->port, up->port.mctrl);
29 spin_unlock_irqrestore(&up->port.lock, flags);
30- tty_termios_encode_baud_rate(termios, baud, baud);
31+ /* Don't rewrite B0 */
32+ if (tty_termios_baud_rate(termios))
33+ tty_termios_encode_baud_rate(termios, baud, baud);
34 }
35
36 static void