android_kernel_xiaomi_sm7250/drivers/serial
Alex Williamson 40b36daad0 [PATCH] 8250 UART backup timer
The patch below works around a minor bug found in the UART of the remote
management card used in many HP ia64 and parisc servers (aka the Diva
UARTs).  The problem is that the UART does not reassert the THRE interrupt
if it has been previously cleared and the IIR THRI bit is re-enabled.  This
can produce a very annoying failure mode when used as a serial console,
allowing a boot/reboot to hang indefinitely until an RX interrupt kicks it
into working again (ie.  an unattended reboot could stall).

To solve this problem, a backup timer is introduced that runs alongside the
standard interrupt driven mechanism.  This timer wakes up periodically,
checks for a hang condition and gets characters moving again.  This backup
mechanism is only enabled if the UART is detected as having this problem,
so systems without these UARTs will have no additional overhead.

This version of the patch incorporates previous comments from Pavel and
removes races in the bug detection code.  The test is now done before the
irq linking to prevent races with interrupt handler clearing the THRE
interrupt.  Short delays and syncs are also added to ensure the device is
able to update register state before the result is tested.

Aristeu says:

  this was tested on the following HP machines and solved the problem:
  rx2600, rx2620, rx1600 and rx1620s.

hpa says:

  I have seen this same bug in soft UART IP from "a major vendor."

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Acked-by: Aristeu Sergio Rozanski Filho <aris@cathedrallabs.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-14 08:09:52 -08:00
..
cpm_uart [POWERPC] Fix kernel build errors for mpc8272ads and mpc8560ads 2007-02-07 14:03:20 +11:00
jsm [PATCH] tty: switch to ktermios 2006-12-08 08:28:57 -08:00
8250_accent.c [SERIAL] Use an enum for serial8250 platform device IDs 2005-09-08 16:04:41 +01:00
8250_acorn.c [PATCH] ioremap balanced with iounmap for drivers/serial/8250_acorn,c 2006-10-01 00:39:32 -07:00
8250_au1x00.c [SERIAL] AMD Alchemy UART: claim memory range 2006-04-30 11:15:58 +01: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] kernel console should send CRLF not LFCR 2006-03-20 20:00:09 +00:00
8250_exar_st16c554.c [PATCH] Exar quad port serial 2006-12-07 08:39:35 -08: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] Clean up asm-parisc/serial.h 2006-10-04 06:47:03 -06:00
8250_hp300.c [PATCH] hp300: fix driver_register() return handling, remove dio_module_init() 2006-03-25 08:22:53 -08:00
8250_hub6.c [SERIAL] Use an enum for serial8250 platform device IDs 2005-09-08 16:04:41 +01:00
8250_mca.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
8250_pci.c [PATCH] serial: support for new board 2007-02-11 10:51:33 -08:00
8250_pnp.c [PATCH] make 8250_pnp serial driver work after suspend to ram 2006-12-07 08:39:43 -08:00
8250.c [PATCH] 8250 UART backup timer 2007-02-14 08:09:52 -08:00
8250.h Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
21285.c [PATCH] tty: switch to ktermios 2006-12-08 08:28:57 -08:00
68328serial.c [PATCH] tty: switch to ktermios 2006-12-08 08:28:57 -08:00
68328serial.h Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
68360serial.c [PATCH] tty: switch to ktermios 2006-12-08 08:28:57 -08:00
amba-pl010.c [ARM] Fix AMBA serial drivers for non-first serial ports 2007-01-24 11:59:57 +00:00
amba-pl011.c [ARM] Fix AMBA serial drivers for non-first serial ports 2007-01-24 11:59:57 +00:00
atmel_serial.c [PATCH] atmel_serial: Use __raw I/O register access 2007-02-12 09:48:29 -08:00
atmel_serial.h [ARM] 4086/1: AT91: Whitespace cleanup 2007-01-24 11:59:55 +00:00
clps711x.c [PATCH] tty: switch to ktermios 2006-12-08 08:28:57 -08:00
crisv10.c [PATCH] Char: tty_wakeup cleanup 2007-02-11 10:51:26 -08:00
crisv10.h [PATCH] tty: switch to ktermios 2006-12-08 08:28:57 -08:00
dz.c [PATCH] tty: switch to ktermios 2006-12-08 08:28:57 -08:00
dz.h [PATCH] dz: Fixes to make it work 2006-12-07 08:39:41 -08:00
icom.c Fix small typo in drivers/serial/icom.c 2006-12-12 19:20:35 +01:00
icom.h [PATCH] serial/icom: Remove custom msescs_to_jiffies() macro 2005-06-25 16:25:01 -07:00
imx.c [PATCH] tty: switch to ktermios 2006-12-08 08:28:57 -08:00
ioc3_serial.c [PATCH] tty: switch to ktermios 2006-12-08 08:28:57 -08:00
ioc4_serial.c [PATCH] IOC3/IOC4: PCI mem space resources 2007-02-11 10:51:25 -08:00
ip22zilog.c [PATCH] tty: switch to ktermios 2006-12-08 08:28:57 -08:00
ip22zilog.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
Kconfig [POWERPC] Open Firmware serial port driver 2007-02-14 11:50:04 +11:00
m32r_sio_reg.h Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
m32r_sio.c [PATCH] tty: switch to ktermios 2006-12-08 08:28:57 -08:00
m32r_sio.h Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
Makefile [POWERPC] Open Firmware serial port driver 2007-02-14 11:50:04 +11:00
mcfserial.c [PATCH] tty: switch to ktermios 2006-12-08 08:28:57 -08:00
mcfserial.h Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
mpc52xx_uart.c [POWERPC] Fixup mp5200 drivers to match device tree changes 2007-02-13 15:35:53 +11:00
mpsc.c [PATCH] tty: switch to ktermios 2006-12-08 08:28:57 -08:00
mux.c [PATCH] tty: switch to ktermios 2006-12-08 08:28:57 -08:00
netx-serial.c [PATCH] tty: switch to ktermios 2006-12-08 08:28:57 -08:00
of_serial.c [POWERPC] Open Firmware serial port driver 2007-02-14 11:50:04 +11:00
pmac_zilog.c [PATCH] tty: switch to ktermios 2006-12-08 08:28:57 -08:00
pmac_zilog.h [PATCH] tty: switch to ktermios 2006-12-08 08:28:57 -08:00
pxa.c [PATCH] tty: switch to ktermios 2006-12-08 08:28:57 -08:00
s3c2410.c [PATCH] tty: switch to ktermios 2006-12-08 08:28:57 -08:00
sa1100.c [PATCH] tty: switch to ktermios 2006-12-08 08:28:57 -08:00
serial_core.c [PATCH] tty: switch to ktermios 2006-12-08 08:28:57 -08:00
serial_cs.c [PATCH] pcmcia: conf.ConfigBase and conf.Present consolidation 2006-12-04 20:12:02 -05:00
serial_lh7a40x.c [PATCH] tty: switch to ktermios 2006-12-08 08:28:57 -08:00
serial_txx9.c [PATCH] serial: serial_txx9 driver update 2007-02-11 10:51:27 -08:00
sh-sci.c sh: SH-MobileR SH7722 CPU support. 2006-12-12 08:42:09 +09:00
sh-sci.h sh: SH-MobileR SH7722 CPU support. 2006-12-12 08:42:09 +09:00
sn_console.c [PATCH] tty: switch to ktermios 2006-12-08 08:28:57 -08:00
suncore.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
suncore.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
sunhv.c [PATCH] tty: switch to ktermios 2006-12-08 08:28:57 -08:00
sunsab.c [SPARC64]: Fix of_iounmap() region release. 2006-12-31 14:06:05 -08:00
sunsab.h [SUNSAB]: Defer register updates until transmitter is idle. 2005-05-11 11:34:32 -07:00
sunsu.c [SPARC64]: Fix of_iounmap() region release. 2006-12-31 14:06:05 -08:00
sunzilog.c [SPARC64]: Fix of_iounmap() region release. 2006-12-31 14:06:05 -08:00
sunzilog.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
uartlite.c [PATCH] drivers/serial NULL noise removal 2007-02-09 09:14:06 -08:00
v850e_uart.c [PATCH] tty: switch to ktermios 2006-12-08 08:28:57 -08:00
vr41xx_siu.c [PATCH] tty: switch to ktermios 2006-12-08 08:28:57 -08:00