linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc: Loosen udbg_probe_uart_speed sanity checking
@ 2005-12-20 22:16 Kumar Gala
  0 siblings, 0 replies; only message in thread
From: Kumar Gala @ 2005-12-20 22:16 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: linuxppc64-dev, linuxppc-dev

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@kernel.crashing.org>

---
commit 8bec94b3bb35c0273fbab5a6aa477ec71a4d1fab
tree c2dde72aa75a3d807a918556e97b21723c10267b
parent a86f866f7b31e01c729ee7498228c547a51d8514
author Kumar Gala <galak@kernel.crashing.org> Tue, 20 Dec 2005 16:17:13 -0600
committer Kumar Gala <galak@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;

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2005-12-20 22:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-20 22:16 [PATCH] powerpc: Loosen udbg_probe_uart_speed sanity checking Kumar Gala

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).