Revision 547039ec502076e60034eeb79611df3433a99b7d authored by Peter Hurley on 16 October 2014, 17:46:38 UTC, committed by Greg Kroah-Hartman on 06 November 2014, 00:14:09 UTC
uart_get_baud_rate() will return baud == 0 if the max rate is set to the "magic" 38400 rate and the SPD_* flags are also specified. On the first iteration, if the current baud rate is higher than the max, the baud rate is clamped at the max (which in the degenerate case is 38400). On the second iteration, the now-"magic" 38400 baud rate selects the possibly higher alternate baud rate indicated by the SPD_* flag. Since only two loop iterations are performed, the loop is exited, a kernel WARNING is generated and a baud rate of 0 is returned. Reproducible with: setserial /dev/ttyS0 spd_hi base_baud 38400 Only perform the "magic" 38400 -> SPD_* baud transform on the first loop iteration, which prevents the degenerate case from recognizing the clamped baud rate as the "magic" 38400 value. Reported-by: Robert Święcki <robert@swiecki.net> Cc: <stable@vger.kernel.org> # all Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 0df1f24
File | Mode | Size |
---|---|---|
mpu401 | ||
opl3 | ||
opl4 | ||
pcsp | ||
vx | ||
Kconfig | -rw-r--r-- | 6.8 KB |
Makefile | -rw-r--r-- | 788 bytes |
aloop.c | -rw-r--r-- | 35.5 KB |
dummy.c | -rw-r--r-- | 32.0 KB |
ml403-ac97cr.c | -rw-r--r-- | 39.8 KB |
mtpav.c | -rw-r--r-- | 20.0 KB |
mts64.c | -rw-r--r-- | 26.6 KB |
pcm-indirect2.c | -rw-r--r-- | 16.8 KB |
pcm-indirect2.h | -rw-r--r-- | 5.1 KB |
portman2x4.c | -rw-r--r-- | 25.2 KB |
serial-u16550.c | -rw-r--r-- | 30.8 KB |
virmidi.c | -rw-r--r-- | 5.5 KB |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...