linux/drivers/char
Paul Fulghum ae030e435f tty_set_ldisc() receive_room fix
Fix tty_set_ldisc in tty_io.c so that tty->receive_room is only cleared if
actually changing line disciplines.

Without this fix a problem occurs when requesting the line discipline to
change to the same line discipline.  In this case tty->receive_room is
cleared but ldisc->open() is not called to set tty->receive_room back to a
sane value.  The result is that tty->receive_room is stuck at 0 preventing
the tty flip buffer from passing receive data to the line discipline.

For example: a switch from N_TTY to N_TTY followed by a select() call for
read input results in data never being received because tty->receive_room
is stuck at zero.

A switch from N_TTY to N_TTY followed by a read() call works because the
read() call itself sets tty->receive_room correctly (but select does not).

Previously (< 2.6.18) this was not a problem because the tty flip buffer
pushed data to the line discipline without regard for tty->receive room.

Signed-off-by: Paul Fulghum <paulkf@microgate.com>
Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-09 12:30:49 -07:00
..
agp Merge branch 'linux-2.6' 2007-05-08 13:37:51 +10:00
drm via: Make sure we flush write-combining using a follow-up read. 2007-05-08 15:48:39 +10:00
hw_random pasemi: hardware rng driver 2007-05-09 12:30:49 -07:00
ip2
ipmi no longer #include <asm/kdebug.h> 2007-05-08 11:15:20 -07:00
mwave
pcmcia cm4000_cs: use bitrev 2007-05-09 12:30:49 -07:00
rio
tpm Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 2007-05-08 11:50:19 -07:00
watchdog header cleaning: don't include smp_lock.h when not used 2007-05-08 11:15:07 -07:00
.gitignore
amiserial.c drivers/char: use __set_current_state() 2007-05-08 11:15:13 -07:00
apm-emulation.c
applicom.c
applicom.h
briq_panel.c [POWERPC] Rename get_property to of_get_property: drivers 2007-05-02 20:04:32 +10:00
cd1865.h
ChangeLog
consolemap.c console UTF-8 fixes 2007-05-08 11:15:12 -07:00
cp437.uni
cs5535_gpio.c Char: cs5535_gpio, add MODULE_DEVICE_TABLE 2007-05-08 11:15:04 -07:00
cyclades.c Char: cyclades, copyright and version changes 2007-05-08 11:15:25 -07:00
decserial.c
defkeymap.c_shipped
defkeymap.map
digi1.h
digiFep1.h
digiPCI.h
ds1286.c
ds1302.c
ds1620.c header cleaning: don't include smp_lock.h when not used 2007-05-08 11:15:07 -07:00
dsp56k.c header cleaning: don't include smp_lock.h when not used 2007-05-08 11:15:07 -07:00
dtlk.c dtlk: fix error checks in module_init() 2007-05-08 11:15:09 -07:00
ec3104_keyb.c header cleaning: don't include smp_lock.h when not used 2007-05-08 11:15:07 -07:00
efirtc.c
epca.c drivers/char: use __set_current_state() 2007-05-08 11:15:13 -07:00
epca.h
epcaconfig.h
esp.c
generic_nvram.c
generic_serial.c [PATCH] generic_serial: fix decoding of baud rate 2007-03-27 09:05:15 -07:00
genrtc.c drivers/char: use __set_current_state() 2007-05-08 11:15:13 -07:00
hangcheck-timer.c header cleaning: don't include smp_lock.h when not used 2007-05-08 11:15:07 -07:00
hpet.c
hvc_beat.c
hvc_console.c drivers/char/hvc_console.c: cleanups 2007-05-08 11:14:59 -07:00
hvc_console.h
hvc_iseries.c [POWERPC] Rename device_is_compatible to of_device_is_compatible 2007-05-07 20:31:14 +10:00
hvc_rtas.c
hvc_vio.c [POWERPC] Rename device_is_compatible to of_device_is_compatible 2007-05-07 20:31:14 +10:00
hvcs.c
hvsi.c [POWERPC] Rename get_property to of_get_property: partial drivers 2007-04-27 15:51:56 +10:00
i8k.c i386: sched.h inclusion from module.h is baack 2007-05-08 11:15:08 -07:00
ip27-rtc.c header cleaning: don't include smp_lock.h when not used 2007-05-08 11:15:07 -07:00
isicom.c Char: isicom, use pr_debug 2007-05-08 11:15:24 -07:00
istallion.c
Kconfig Char: cyclades, depends on PCI or ISA 2007-05-08 11:15:24 -07:00
keyboard.c SPIN_LOCK_UNLOCKED cleanup in drivers/char/keyboard 2007-05-08 11:15:11 -07:00
lcd.c [CHAR] lcd: Fix two warnings. 2007-03-17 01:03:26 +00:00
lcd.h
lp.c ROUND_UP macro cleanup in drivers/char/lp.c 2007-05-08 11:15:08 -07:00
Makefile rename TANBAC TB0219 config 2007-05-07 12:13:04 -07:00
mbcs.c
mbcs.h
mem.c Make /dev/port conditional on config symbol 2007-05-08 11:15:07 -07:00
misc.c use mutex instead of semaphore for misc char devices 2007-05-08 11:15:15 -07:00
mmtimer.c
moxa.c old buffer overflow in moxa driver 2007-05-08 11:15:14 -07:00
mspec.c
mxser_new.c header cleaning: don't include smp_lock.h when not used 2007-05-08 11:15:07 -07:00
mxser_new.h
mxser.c header cleaning: don't include smp_lock.h when not used 2007-05-08 11:15:07 -07:00
mxser.h
n_hdlc.c
n_r3964.c drivers/char: use __set_current_state() 2007-05-08 11:15:13 -07:00
n_tty.c
nsc_gpio.c
nvram.c
nwbutton.c
nwbutton.h
nwflash.c
pc8736x_gpio.c
ppdev.c header cleaning: don't include smp_lock.h when not used 2007-05-08 11:15:07 -07:00
pty.c
random.c [NET]: random functions can use nsec resolution instead of usec 2007-04-25 22:28:25 -07:00
raw.c
riscom8_reg.h
riscom8.c drivers/char: use __set_current_state() 2007-05-08 11:15:13 -07:00
riscom8.h
rocket_int.h use mutex instead of semaphore in RocketPort driver 2007-05-08 11:15:15 -07:00
rocket.c use mutex instead of semaphore in RocketPort driver 2007-05-08 11:15:15 -07:00
rocket.h
rtc.c drivers/char: use __set_current_state() 2007-05-08 11:15:13 -07:00
scc.h
scx200_gpio.c
selection.c drivers/char: use __set_current_state() 2007-05-08 11:15:13 -07:00
ser_a2232.c
ser_a2232.h
ser_a2232fw.ax
ser_a2232fw.h
serial167.c drivers/char: use __set_current_state() 2007-05-08 11:15:13 -07:00
snsc_event.c
snsc.c
snsc.h
sonypi.c sonypi: use mutex instead of semaphore 2007-04-28 22:13:34 -04:00
specialix_io8.h
specialix.c
stallion.c
sx.c
sx.h
sxboards.h
sxwindow.h
synclink_gt.c synclink_gt use dynamic tty device registration 2007-05-08 11:15:15 -07:00
synclink.c drivers/char/synclink.c: check kmalloc() return value 2007-05-08 11:15:02 -07:00
synclinkmp.c
sysrq.c header cleaning: don't include smp_lock.h when not used 2007-05-08 11:15:07 -07:00
tb0219.c
tipar.c layered parport code uses parport->dev 2007-05-08 11:15:05 -07:00
tlclk.c
toshiba.c
tty_io.c tty_set_ldisc() receive_room fix 2007-05-09 12:30:49 -07:00
tty_ioctl.c
vc_screen.c use mutex instead of semaphore in virtual console driver 2007-05-08 11:15:33 -07:00
viocons.c
viotape.c
vme_scc.c
vr41xx_giu.c
vt_ioctl.c drivers/char: use __set_current_state() 2007-05-08 11:15:13 -07:00
vt.c use mutex instead of semaphore in virtual console driver 2007-05-08 11:15:33 -07:00