kernel-ark/drivers/serial
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
..
cpm_uart [PATCH] Update email address for Kumar 2005-11-13 18:14:10 -08:00
jsm
8250_accent.c
8250_acorn.c
8250_acpi.c
8250_au1x00.c [SERIAL] Support Au1x00 8250 UARTs using the generic 8250 driver. 2005-11-06 09:07:03 +00:00
8250_boca.c
8250_early.c [SERIAL] 8250_early.c passing 0 instead of NULL 2005-11-03 21:07:37 +00:00
8250_fourport.c
8250_gsc.c
8250_hp300.c
8250_hub6.c [SERIAL] Use an enum for serial8250 platform device IDs 2005-09-08 16:04:41 +01:00
8250_mca.c [SERIAL] Use an enum for serial8250 platform device IDs 2005-09-08 16:04:41 +01:00
8250_pci.c
8250_pnp.c [SERIAL] Claim Wacom tablet device on HP tc1100 tablet 2005-11-12 22:06:31 +00:00
8250.c [SERIAL] don't disable xscale serial ports after autoconfig 2005-11-12 21:58:05 +00:00
8250.h [SERIAL] Support Au1x00 8250 UARTs using the generic 8250 driver. 2005-11-06 09:07:03 +00:00
21285.c [ARM] 2907/1: GCC 4 serial driver compile fixes 2005-09-14 22:36:03 +01:00
68328serial.c [PATCH] move pm_register/etc. to CONFIG_PM_LEGACY, pm_legacy.h 2005-11-13 18:14:10 -08:00
68328serial.h
68360serial.c [PATCH] move 68360serial.c over use initcalls 2005-09-07 16:57:24 -07:00
amba-pl010.c
amba-pl011.c
au1x00_uart.c
clps711x.c [PATCH] ARM: Reverted 2918/1: [update] Base port of Comdial MP1000 platfrom 2005-11-04 17:28:34 +00:00
crisv10.c [PATCH] serial: fix-up schedule_timeout() usage 2005-11-07 07:53:59 -08:00
crisv10.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
dz.c [SERIAL] dz: Use CKSEG1ADDR to setup mappings. 2005-11-12 22:00:27 +00:00
dz.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
icom.c
icom.h
imx.c [DRIVER MODEL] Convert platform drivers to use struct platform_driver 2005-11-09 22:32:44 +00:00
ioc4_serial.c
ip22zilog.c [SERIAL] Clean up and fix tty transmission start/stoping 2005-08-31 10:12:14 +01:00
ip22zilog.h
Kconfig [SERIAL] Support Au1x00 8250 UARTs using the generic 8250 driver. 2005-11-06 09:07:03 +00:00
m32r_sio_reg.h
m32r_sio.c [SERIAL] Clean up and fix tty transmission start/stoping 2005-08-31 10:12:14 +01:00
m32r_sio.h
Makefile [SERIAL] Support Au1x00 8250 UARTs using the generic 8250 driver. 2005-11-06 09:07:03 +00:00
mcfserial.c [PATCH] m68knommu: add 5208 ColdFire UART support to ColdFire serial driver 2005-11-07 08:00:46 -08:00
mcfserial.h
mpc52xx_uart.c [SERIAL] Fix mpc52xx_uart.c 2005-11-12 22:04:06 +00:00
mpsc.c [DRIVER MODEL] Convert platform drivers to use struct platform_driver 2005-11-09 22:32:44 +00:00
mpsc.h
mux.c [PARISC] Define port->timeout to fix a long msleep in mux.c 2005-11-17 16:38:28 -05:00
pmac_zilog.c
pmac_zilog.h
pxa.c [DRIVER MODEL] Convert platform drivers to use struct platform_driver 2005-11-09 22:32:44 +00:00
s3c2410.c [DRIVER MODEL] Convert platform drivers to use struct platform_driver 2005-11-09 22:32:44 +00:00
sa1100.c [SERIAL] sa1100_start_tx spinlock recursion 2005-11-12 22:09:22 +00:00
serial_core.c [SERIAL] Fix Bug 4900: S3 resume oops with irattach - Thinkpad A21m 2005-11-13 15:28:51 +00:00
serial_cs.c
serial_lh7a40x.c
serial_txx9.c [PATCH] txx9 serial update 2005-09-09 13:57:27 -07:00
sh-sci.c
sh-sci.h
sn_console.c
suncore.c
suncore.h
sunsab.c
sunsab.h
sunsu.c [SUNSU]: Do not mark sunsu_console_setup() __init 2005-11-07 14:10:21 -08:00
sunzilog.c
sunzilog.h
uart00.c
v850e_uart.c
vr41xx_siu.c [DRIVER MODEL] Convert platform drivers to use struct platform_driver 2005-11-09 22:32:44 +00:00