linux-stable-rt/drivers
Ryan Bradetich a137ce8536 [PARISC] Define port->timeout to fix a long msleep in mux.c
This commit is in response to a bug reported by Vesa on the irc channel
a couple of weeks ago.

The bug was that the console would apparently hang (not return) while
using the mux console.

The root cause of this bug is that bash (with readline support) makes a
call to the tcsetattr() glibc function with the argument TCSADRAIN.  This
causes the serial core in the kernel use the uart_wait_until_sent() to be
called. This function verifies the mux transmit queue is empty or calls the
msleep_interruptable() with a calculated timeout value that is dependant
upon the port->timeout variable.

The real problem here is that the port->timeout was not defined so it
was defaulted to 0 and the timeout calculation performs the following
calculation:

char_time = (port->timeout - HZ/50) / port->fifosize;

where char_time is an unsigned long. Since the serial Mux does not use
interrupts, the msleep_interruptable() function waits until the timeout
has been reached ... and when the port->timeout < HZ/50 this timeout will
be a long time. (I have validated that the console will eventually
return ... but it takes quite a while for this to happen).

This patch simply sets the port->timeout on the Mux to HZ/50 to avoid
this long timeout period.

Signed-off-by: Ryan Bradetich <rbrad@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-11-17 16:38:28 -05:00
..
acorn
acpi
atm
base [PATCH] fix leaks in request_firmware_nowait 2005-11-13 18:14:17 -08:00
block [PATCH] cciss_scsi warning fix 2005-11-15 08:59:20 -08:00
bluetooth
cdrom
char [PATCH] ipmi: bump-driver-version 2005-11-15 08:59:19 -08:00
connector
cpufreq
crypto
dio
eisa
fc4
firmware
hwmon
i2c [PATCH] Fix IXP4xx I2C driver build breakage 2005-11-17 11:23:48 -08:00
ide [IDE] Add driver for Sibyte Swarm evaluation board 2005-11-17 16:23:50 +00:00
ieee1394
infiniband
input
isdn [PATCH] hfc_usb: fix usb device table 2005-11-15 08:59:19 -08:00
macintosh
mca
md [PATCH] md: make md threads interruptible again 2005-11-15 08:59:19 -08:00
media [DVB] cinergyT2: cinergyt2_register_rc() should return 0 on success 2005-11-16 00:11:50 -08:00
message
mfd
misc
mmc
mtd
net [PATCH] ipw2200: fix error log offset calculation 2005-11-17 08:32:58 -08:00
nubus
oprofile
parisc [PARISC] Add IRQ affinities 2005-11-17 16:28:37 -05:00
parport
pci [PATCH] shpchp_hpc build fix 2005-11-13 18:14:12 -08:00
pcmcia
pnp
rapidio
s390
sbus
scsi [libata sata_mv] SATA probe, DMA boundary fixes 2005-11-17 10:59:48 -05:00
serial [PARISC] Define port->timeout to fix a long msleep in mux.c 2005-11-17 16:38:28 -05:00
sh
sn
tc [MIPS] zs.c: Resurrect the deceased zs.c for now. 2005-11-17 16:23:39 +00:00
telephony
usb [PATCH] USB: add the anydata usb-serial driver 2005-11-17 11:29:55 -08:00
video [PATCH] make vesafb build without CONFIG_MTRR 2005-11-13 18:14:21 -08:00
w1
zorro
Kconfig
Makefile