linux-kernel-test/drivers
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
..
accessibility
acpi Merge branches 'release', 'asus', 'bugzilla-12450', 'cpuidle', 'debug', 'ec', 'misc', 'printk' and 'processor' into release 2009-02-07 01:34:56 -05:00
amba
ata Add support for VT6415 PCIE PATA IDE Host Controller 2009-02-17 16:56:31 -08:00
atm fore200: fix oops on failed firmware load 2009-02-10 17:19:19 -08:00
auxdisplay
base driver-core: fix kernel-doc parameter name 2009-01-28 15:55:48 -08:00
block Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block 2009-02-18 18:33:04 -08:00
bluetooth
cdrom
char sx.c: avoid referencing freed memory if copy_from_user() fails 2009-02-20 17:57:49 -08:00
clocksource
connector
cpufreq [CPUFREQ] Make ignore_nice_load setting of ondemand work as expected. 2009-02-05 12:25:26 -05:00
cpuidle
crypto
dca dca: redesign locks to fix deadlocks 2009-02-02 23:26:57 -08:00
dio
dma atmel-mci: fix initialization of dma slave data 2009-02-18 15:37:55 -08:00
edac powerpc: More printing warning fixes for the l64 to ll64 conversion 2009-01-28 17:15:52 +11:00
eisa
firewire firewire: core: Remove card from list of cards when enable fails 2009-02-01 11:17:24 +01:00
firmware Bernhard has moved 2009-02-18 15:37:56 -08:00
gpio gpiolib: fix request related issue 2009-01-29 18:04:43 -08:00
gpu fbdev/drm: fix Kconfig submenu mess in "Graphics support" 2009-02-18 15:37:56 -08:00
hid HID: move tmff and zpff devices from ignore_list to blacklist 2009-02-17 13:25:01 +01:00
hwmon lis3lv02d: add axes knowledge of HP Pavilion dv5 models 2009-02-18 15:37:54 -08:00
i2c i2c: Move old eeprom driver to /drivers/misc/eeprom 2009-01-26 21:19:53 +01:00
ide Fix my email address in qd65xx.[ch]/pata_qdi.c 2009-02-03 16:53:56 -08:00
idle
ieee1394 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6 2009-02-06 08:48:16 -08:00
infiniband
input
isdn drivers/isdn: introduce missing kfree 2009-02-08 17:00:49 -08:00
leds
lguest lguest: Fix a memory leak with the lg object during launcher close 2009-01-30 11:34:11 +10:30
macintosh
mca
md block: fix bad definition of BIO_RW_SYNC 2009-02-18 10:32:00 +01:00
media V4L/DVB (10626): ivtv: fix regression in get sliced vbi format 2009-02-17 09:43:09 -03:00
memstick
message
mfd mfd: Fix sm501_register_gpio section mismatch 2009-02-17 09:48:05 +01:00
misc sgi-xp: fix writing past the end of kzalloc()'d space 2009-02-05 12:56:49 -08:00
mmc Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc 2009-02-18 17:55:15 -08:00
mtd [ARM] 5400/1: Add support for inverted rdy_busy pin for Atmel nand device controller 2009-02-16 21:40:39 +00:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2009-02-12 17:47:15 -08:00
nubus
of
oprofile
parisc Documentation: move DMA-mapping.txt to Doc/PCI/ 2009-01-29 18:19:29 -08:00
parport parport: parport_serial, don't bind netmos ibm 0299 2009-02-11 14:25:37 -08:00
pci Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-02-17 14:26:35 -08:00
pcmcia
platform x86: dell-laptop: depends on POWER_SUPPLY 2009-02-18 15:37:56 -08:00
pnp
power pcf50633_charger: Fix typo 2009-02-02 19:53:02 +03:00
ps3
rapidio
regulator leds: Fix bounds checking of wm8350->pmic.led 2009-01-30 21:50:49 +00:00
rtc rtc: t reaches -1, tested 0 2009-02-11 14:25:36 -08:00
s390 [S390] fix "mem=" handling in case of standby memory 2009-02-19 15:19:19 +01:00
sbus
scsi [SCSI] ibmvfc: Fix DMA mapping leak on memory allocation failure 2009-01-25 08:14:53 -06:00
serial 8250: fix boot hang with serial console when using with Serial Over Lan port 2009-02-20 17:57:50 -08:00
sh
sn
spi spi-gpio: sanitize MISO bitvalue 2009-02-18 15:37:56 -08:00
ssb
staging Staging: panel: fix lcd panel driver build failure 2009-02-09 11:26:18 -08:00
tc
telephony
thermal
uio
usb Merge master.kernel.org:/home/rmk/linux-2.6-arm 2009-02-19 09:52:12 -08:00
uwb uwb: lock rc->rsvs_lock with spin_lock_bh() 2009-01-23 12:57:20 +00:00
video atyfb: remove unused local variable `pwr_command' 2009-02-20 17:57:50 -08:00
virtio virtio-pci: do not oops on config change if driver not loaded 2009-02-02 19:17:56 -08:00
w1 w1: w1 temp calculation overflow fix 2009-02-11 14:25:37 -08:00
watchdog Merge master.kernel.org:/home/rmk/linux-2.6-arm 2009-02-19 09:52:12 -08:00
xen xen: make sysfs files behave as their names suggest 2009-01-29 13:20:36 +01:00
zorro
Kconfig
Makefile