linux-stable-rt/drivers
Alan Cox 78137e3b34 [PATCH] tty: improve encode_baud_rate logic
Mostly so people can see the work in progress.  This enhances the encode
function which isn't currently used in the base tree but is when using some of
the testing tty patches.

This resolves a problem with some hardware where applications got confusing
information from the tty ioctls.  Correct but confusing.

In some situations asking for, say, 9600 baud actually gets you 9595 baud or
similar near-miss values.  With the old code this meant that a request for
B9600 got a return of BOTHER, 9595 which programs interpreted as a failure.

The new code now works on the following basis

- If you ask for specific rate via BOTHER, you get a precise return

- If you ask for a standard Bfoo rate and the result is close you get a Bfoo
  return

- If you ask for a standard Bfoo rate and get something way off you get a
  BOTHER/rate return

This seems to fix up the cases I've found where this broke compatibility.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:32 -08:00
..
acorn
acpi
amba
ata
atm [PATCH] Get rid of "double zeroing" of allocated pages 2007-02-11 10:51:31 -08:00
auxdisplay
base
block
bluetooth
cdrom
char [PATCH] tty: improve encode_baud_rate logic 2007-02-11 10:51:32 -08:00
clocksource
connector
cpufreq
crypto
dio
dma
edac
eisa
fc4
firmware
hid
hwmon
i2c
ide [PATCH] proc: remove useless (and buggy) ->nlink settings 2007-02-11 10:51:32 -08:00
ieee1394
infiniband
input [PATCH] Remove unnecessary memset(0) calls after kzalloc() calls. 2007-02-11 10:51:31 -08:00
isdn
kvm
leds
macintosh [PATCH] proc: remove useless (and buggy) ->nlink settings 2007-02-11 10:51:32 -08:00
mca
md [PATCH] remove invalidate_inode_pages() 2007-02-11 10:51:31 -08:00
media [PATCH] Get rid of "double zeroing" of allocated pages 2007-02-11 10:51:31 -08:00
message
mfd
misc [PATCH] proc: remove useless (and buggy) ->nlink settings 2007-02-11 10:51:32 -08:00
mmc
mtd [PATCH] remove invalidate_inode_pages() 2007-02-11 10:51:31 -08:00
net
nubus
oprofile
parisc [PATCH] proc: remove useless (and buggy) ->nlink settings 2007-02-11 10:51:32 -08:00
parport
pci
pcmcia
pnp [PATCH] Remove unnecessary memset(0) calls after kzalloc() calls. 2007-02-11 10:51:31 -08:00
ps3
rapidio
rtc [PATCH] rtc-pcf8563: detect polarity of century bit automatically 2007-02-09 09:25:46 -08:00
s390 [PATCH] proc: remove useless (and buggy) ->nlink settings 2007-02-11 10:51:32 -08:00
sbus
scsi [PATCH] Get rid of "double zeroing" of allocated pages 2007-02-11 10:51:31 -08:00
serial
sh
sn
spi
tc
telephony
usb [PATCH] proc: remove useless (and buggy) ->nlink settings 2007-02-11 10:51:32 -08:00
video
w1
zorro
Kconfig
Makefile