kernel-ark/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 libata: kill ATA_ENABLE_PATA 2007-02-09 17:39:40 -05:00
atm [PATCH] Get rid of "double zeroing" of allocated pages 2007-02-11 10:51:31 -08:00
auxdisplay [PATCH] drivers: add LCD support 2007-02-11 10:51:24 -08:00
base [PATCH] Drop __get_zone_counts() 2007-02-11 10:51:18 -08:00
block [PATCH] pktcdvd: cleanup 2007-02-11 10:51:28 -08:00
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 [PATCH] Transform kmem_cache_alloc()+memset(0) -> kmem_cache_zalloc(). 2007-02-11 10:51:27 -08:00
input [PATCH] Remove unnecessary memset(0) calls after kzalloc() calls. 2007-02-11 10:51:31 -08:00
isdn [PATCH] Char: tty_wakeup cleanup 2007-02-11 10:51:26 -08:00
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 devres: device resource management 2007-02-09 17:39:36 -05:00
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 [PATCH] serial: serial_txx9 driver update 2007-02-11 10:51:27 -08:00
sh
sn [PATCH] IOC3/IOC4: PCI mem space resources 2007-02-11 10:51:25 -08:00
spi
tc [PATCH] Char: tty_wakeup cleanup 2007-02-11 10:51:26 -08:00
telephony
usb [PATCH] proc: remove useless (and buggy) ->nlink settings 2007-02-11 10:51:32 -08:00
video
w1
zorro
Kconfig [PATCH] drivers: add LCD support 2007-02-11 10:51:24 -08:00
Makefile [PATCH] drivers: add LCD support 2007-02-11 10:51:24 -08:00