]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - 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
1 From e991a2bd4fa0b2f475b67dfe8f33e8ecbdcbb40b Mon Sep 17 00:00:00 2001
2 From: Alan Cox <alan@lxorguk.ukuu.org.uk>
3 Date: Mon, 28 Apr 2008 02:14:06 -0700
4 Subject: Fix tty speed handling on 8250
5
6 From: Alan Cox <alan@lxorguk.ukuu.org.uk>
7
8 commit e991a2bd4fa0b2f475b67dfe8f33e8ecbdcbb40b upstream.
9
10 We try and write the correct speed back but the serial midlayer already
11 mangles the speed on us and that means if we request B0 we report back B9600
12 when we should not. For now we'll hack around this in the drivers and serial
13 code, pending a better long term solution.
14
15 Signed-off-by: Alan Cox <alan@redhat.com>
16 Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
17 Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
18 Signed-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