[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20080220204117.2fb5c646@core>
Date: Wed, 20 Feb 2008 20:41:17 +0000
From: Alan Cox <alan@...rguk.ukuu.org.uk>
To: akpm@...l.org, linux-kernel@...r.kernel.org
Subject: [PATCH] Fix tty speed handling on 8250
We try and write the correct speed back but the serial midlayer already
mangles the speed on us and that means if we request B0 we report back
B9600 when we should not. For now we'll hack around this in the drivers
and serial code, pending a better long term solution.
Signed-off-by: Alan Cox <alan@...hat.com>
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.25-rc2-mm1/drivers/serial/8250.c linux-2.6.25-rc2-mm1/drivers/serial/8250.c
--- linux.vanilla-2.6.25-rc2-mm1/drivers/serial/8250.c 2008-02-19 11:03:01.000000000 +0000
+++ linux-2.6.25-rc2-mm1/drivers/serial/8250.c 2008-02-20 16:31:16.000000000 +0000
@@ -2174,7 +2174,9 @@
}
serial8250_set_mctrl(&up->port, up->port.mctrl);
spin_unlock_irqrestore(&up->port.lock, flags);
- tty_termios_encode_baud_rate(termios, baud, baud);
+ /* Don't rewrite B0 */
+ if (tty_termios_baud_rate(termios))
+ tty_termios_encode_baud_rate(termios, baud, baud);
}
static void
--
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