diff options
author | Kumar Gala <galak@gate.crashing.org> | 2005-12-20 17:16:26 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-01-08 23:33:42 -0500 |
commit | d0e132b536b6c8044991932d0c160676c46c98e5 (patch) | |
tree | 7bbf87c14929a93952992c0d13326b20ea69f3e7 /arch | |
parent | b226e462124522f2f23153daff31c311729dfa2f (diff) |
[PATCH] powerpc: Loosen udbg_probe_uart_speed sanity checking
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>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch')
-rw-r--r-- | 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 e58c048a7b19..7541bf44d2da 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 __iomem *comport, unsigned int clock) | |||
137 | speed = (clock / prescaler) / (divisor * 16); | 137 | speed = (clock / prescaler) / (divisor * 16); |
138 | 138 | ||
139 | /* sanity check */ | 139 | /* sanity check */ |
140 | if (speed < 9600 || speed > 115200) | 140 | if (speed < 0 || speed > (clock / 16)) |
141 | speed = 9600; | 141 | speed = 9600; |
142 | 142 | ||
143 | return speed; | 143 | return speed; |