linux/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 [PATCH] move pm_register/etc. to CONFIG_PM_LEGACY, pm_legacy.h 2005-11-13 18:14:10 -08:00
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 Merge master.kernel.org:/home/rmk/linux-2.6-drvmodel 2005-11-11 09:24:26 -08:00
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 [PATCH] PCI: removed unneeded .owner field from struct pci_driver 2005-11-10 16:09:17 -08:00
input Merge master.kernel.org:/home/rmk/linux-2.6-drvmodel 2005-11-11 09:24:26 -08:00
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 Merge master.kernel.org:/home/rmk/linux-2.6-drvmodel 2005-11-11 09:24:26 -08:00
mmc [MMC] mmci doesn't need asm/irq.h 2005-11-12 17:26:21 +00:00
mtd [MTD] maps: Replace dependency on non existing config option 2005-11-13 19:30:44 +01:00
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 [PCMCIA] inform user of insertion and ejection events 2005-11-12 23:35:34 +01:00
pnp
rapidio
s390 [PATCH] s390: mail address changed 2005-11-11 08:26:22 -05:00
sbus [SPARC]: Fix RTC compat ioctl kernel log spam. 2005-11-12 12:10:54 -08:00
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