linux/drivers/serial
Mauro Carvalho Chehab b6adea334c 8250: fix boot hang with serial console when using with Serial Over Lan port
Intel 8257x Ethernet boards have a feature called Serial Over Lan.

This feature works by emulating a serial port, and it is detected by
kernel as a normal 8250 port.  However, this emulation is not perfect, as
also noticed on changeset 7500b1f602.

Before this patch, the kernel were trying to check if the serial TX is
capable of work using IRQ's.

This were done with a code similar this:

        serial_outp(up, UART_IER, UART_IER_THRI);
        lsr = serial_in(up, UART_LSR);
        iir = serial_in(up, UART_IIR);
        serial_outp(up, UART_IER, 0);

        if (lsr & UART_LSR_TEMT && iir & UART_IIR_NO_INT)
		up->bugs |= UART_BUG_TXEN;

This works fine for other 8250 ports, but, on 8250-emulated SoL port, the
chip is a little lazy to down UART_IIR_NO_INT at UART_IIR register.

Due to that, UART_BUG_TXEN is sometimes enabled.  However, as TX IRQ keeps
working, and the TX polling is now enabled, the driver miss-interprets the
IRQ received later, hanging up the machine until a key is pressed at the
serial console.

This is the 6 version of this patch.  Previous versions were trying to
introduce a large enough delay between serial_outp and serial_in(up,
UART_IIR), but not taking forever.  However, the needed delay couldn't be
safely determined.

At the experimental tests, a delay of 1us solves most of the cases, but
still hangs sometimes.  Increasing the delay to 5us was better, but still
doesn't solve.  A very high delay of 50 ms seemed to work every time.

However, poking around with delays and pray for it to be enough doesn't
seem to be a good approach, even for a quirk.

So, instead of playing with random large arbitrary delays, let's just
disable UART_BUG_TXEN for all SoL ports.

[akpm@linux-foundation.org: fix warnings]
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-02-20 17:57:50 -08:00
..
cpm_uart
jsm jsm: additional device support 2009-02-18 15:37:55 -08:00
8250_accent.c
8250_acorn.c
8250_boca.c
8250_early.c
8250_exar_st16c554.c
8250_fourport.c
8250_gsc.c
8250_hp300.c
8250_hub6.c
8250_mca.c
8250_pci.c 8250: fix boot hang with serial console when using with Serial Over Lan port 2009-02-20 17:57:50 -08:00
8250_pnp.c serial: Add SupraExpress 336i PnP Voice Modem 2009-01-15 12:48:36 -08:00
8250.c 8250: fix boot hang with serial console when using with Serial Over Lan port 2009-02-20 17:57:50 -08:00
8250.h
21285.c
68328serial.c
68328serial.h
68360serial.c
amba-pl010.c
amba-pl011.c
atmel_serial.c atmel_serial might lose modem status change 2009-02-18 15:37:55 -08:00
bfin_5xx.c Blackfin Serial Driver: Remove BI status for known_good_char 2009-01-02 10:19:35 -08:00
bfin_sport_uart.c __FUNCTION__ is gcc-specific, use __func__ 2009-01-02 10:19:42 -08:00
bfin_sport_uart.h
clps711x.c
crisv10.c trivial: fix then -> than typos in comments and documentation 2009-01-06 11:28:06 +01:00
crisv10.h
dz.c
dz.h
icom.c
icom.h
imx.c
ioc3_serial.c
ioc4_serial.c
ip22zilog.c
ip22zilog.h
Kconfig MIPS: enable serial UART support on PNX833X devices. 2009-01-27 07:37:15 -08:00
kgdboc.c
m32r_sio_reg.h
m32r_sio.c
m32r_sio.h
Makefile serial: Add driver for the Cell Network Processor serial port NWP device 2009-01-08 16:25:18 +11:00
mcf.c m68knommu: fix ColdFire 5272 serial baud rates in mcf.c 2009-01-27 16:42:00 +10:00
mpc52xx_uart.c
mpsc.c
mux.c
netx-serial.c
nwpserial.c serial: Add driver for the Cell Network Processor serial port NWP device 2009-01-08 16:25:18 +11:00
of_serial.c serial: Add 16850 uart type support to OF uart driver 2009-01-16 16:15:17 +11:00
pmac_zilog.c
pmac_zilog.h
pnx8xxx_uart.c When a break signal is detected, the next character should be ignored. 2009-01-15 12:48:36 -08:00
pxa.c
s3c24a0.c
s3c2400.c
s3c2410.c
s3c2412.c
s3c2440.c
s3c6400.c
sa1100.c
samsung.c
samsung.h
sb1250-duart.c
sc26xx.c
serial_core.c serial: struct device - replace bus_id with dev_name(), dev_set_name() 2009-01-06 10:44:37 -08:00
serial_cs.c
serial_ks8695.c
serial_lh7a40x.c
serial_txx9.c
sh-sci.c serial: sh-sci: Fix up port pinmux for SH7366. 2008-12-22 18:44:49 +09:00
sh-sci.h sh: fix sh-sci / early printk build on sh7723 2009-01-21 17:44:32 +09:00
sn_console.c
suncore.c
suncore.h
sunhv.c
sunsab.c
sunsab.h
sunsu.c
sunzilog.c
sunzilog.h
uartlite.c
ucc_uart.c
vr41xx_siu.c
zs.c
zs.h