[PATCH] powerpc: Loosen udbg_probe_uart_speed sanity checking

Kumar Gala galak at gate.crashing.org
Wed Dec 21 09:16:26 EST 2005


The checking of the baudrate in udbg_probe_uart_speed was
too tight and would cause reporting back of the default
baud rate in cases where the computed speed was valid.

Signed-off-by: Kumar Gala <galak at kernel.crashing.org>

---
commit 8bec94b3bb35c0273fbab5a6aa477ec71a4d1fab
tree c2dde72aa75a3d807a918556e97b21723c10267b
parent a86f866f7b31e01c729ee7498228c547a51d8514
author Kumar Gala <galak at kernel.crashing.org> Tue, 20 Dec 2005 16:17:13 -0600
committer Kumar Gala <galak at kernel.crashing.org> Tue, 20 Dec 2005 16:17:13 -0600

 arch/powerpc/kernel/udbg_16550.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/kernel/udbg_16550.c b/arch/powerpc/kernel/udbg_16550.c
index e58c048..7541bf4 100644
--- a/arch/powerpc/kernel/udbg_16550.c
+++ b/arch/powerpc/kernel/udbg_16550.c
@@ -137,7 +137,7 @@ unsigned int udbg_probe_uart_speed(void 
 	speed = (clock / prescaler) / (divisor * 16);
 
 	/* sanity check */
-	if (speed < 9600 || speed > 115200)
+	if (speed < 0 || speed > (clock / 16))
 		speed = 9600;
 
 	return speed;




More information about the Linuxppc-dev mailing list