kernel_optimize_test/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 [SERIAL] Clean up and fix tty transmission start/stoping 2005-08-31 10:12:14 +01:00
8250_accent.c [SERIAL] Use an enum for serial8250 platform device IDs 2005-09-08 16:04:41 +01:00
8250_acorn.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
8250_acpi.c [ACPI] 8250 driver now checks for acpi_register_gsi() errors 2005-08-04 22:22:18 -04:00
8250_au1x00.c [SERIAL] Support Au1x00 8250 UARTs using the generic 8250 driver. 2005-11-06 09:07:03 +00:00
8250_boca.c [SERIAL] Use an enum for serial8250 platform device IDs 2005-09-08 16:04:41 +01:00
8250_early.c [SERIAL] 8250_early.c passing 0 instead of NULL 2005-11-03 21:07:37 +00:00
8250_fourport.c [SERIAL] Use an enum for serial8250 platform device IDs 2005-09-08 16:04:41 +01:00
8250_gsc.c [PARISC] Fix mux.c driver 2005-10-21 22:58:03 -04:00
8250_hp300.c [PATCH] Serial: Convert 8250_hp300 to use serial8250_{un,}register_port 2005-04-26 15:37:45 +01:00
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 [SERIAL] new hp diva console port 2005-10-24 22:16:38 +01:00
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 Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
68360serial.c [PATCH] move 68360serial.c over use initcalls 2005-09-07 16:57:24 -07:00
amba-pl010.c [ARM] 3/4: Remove asm/hardware.h from Versatile and Integrator io.h 2005-10-28 14:05:16 +01:00
amba-pl011.c [ARM] 3/4: Remove asm/hardware.h from Versatile and Integrator io.h 2005-10-28 14:05:16 +01:00
au1x00_uart.c [SERIAL] Clean up and fix tty transmission start/stoping 2005-08-31 10:12:14 +01:00
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 [PATCH] Remove non-arch consumers of asm/segment.h 2005-09-07 16:57:34 -07:00
icom.h [PATCH] serial/icom: Remove custom msescs_to_jiffies() macro 2005-06-25 16:25:01 -07:00
imx.c [DRIVER MODEL] Convert platform drivers to use struct platform_driver 2005-11-09 22:32:44 +00:00
ioc4_serial.c [PATCH] ioc4 serial support - mostly cleanup 2005-10-30 17:37:24 -08:00
ip22zilog.c [SERIAL] Clean up and fix tty transmission start/stoping 2005-08-31 10:12:14 +01:00
ip22zilog.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
Kconfig [SERIAL] Support Au1x00 8250 UARTs using the generic 8250 driver. 2005-11-06 09:07:03 +00:00
m32r_sio_reg.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
m32r_sio.c [SERIAL] Clean up and fix tty transmission start/stoping 2005-08-31 10:12:14 +01:00
m32r_sio.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
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 Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
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 [PATCH] ppc annotations: mpsc 2005-04-25 18:32:12 -07:00
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 [PATCH] swsusp: switch pm_message_t to struct 2005-09-05 00:06:16 -07:00
pmac_zilog.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
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 [PATCH] pcmcia: new IDs for serial_cs 2005-09-26 13:11:28 +02:00
serial_lh7a40x.c [ARM] 2907/1: GCC 4 serial driver compile fixes 2005-09-14 22:36:03 +01:00
serial_txx9.c [PATCH] txx9 serial update 2005-09-09 13:57:27 -07:00
sh-sci.c [PATCH] sh-sci.c sci_start_tx error 2005-10-14 17:10:13 -07:00
sh-sci.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
sn_console.c [SERIAL] Clean up and fix tty transmission start/stoping 2005-08-31 10:12:14 +01:00
suncore.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
suncore.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
sunsab.c [SPARC64]: Fix oops on runlevel change with serial console. 2005-10-10 20:43:22 -07:00
sunsab.h [SUNSAB]: Defer register updates until transmitter is idle. 2005-05-11 11:34:32 -07:00
sunsu.c [SUNSU]: Do not mark sunsu_console_setup() __init 2005-11-07 14:10:21 -08:00
sunzilog.c [SPARC64]: Fix oops on runlevel change with serial console. 2005-10-10 20:43:22 -07:00
sunzilog.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
uart00.c [SERIAL] Clean up and fix tty transmission start/stoping 2005-08-31 10:12:14 +01:00
v850e_uart.c [SERIAL] Clean up and fix tty transmission start/stoping 2005-08-31 10:12:14 +01:00
vr41xx_siu.c [DRIVER MODEL] Convert platform drivers to use struct platform_driver 2005-11-09 22:32:44 +00:00