android_kernel_xiaomi_sm8350/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
8250_accent.c
8250_acorn.c
8250_au1x00.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 [PATCH] serial: support for new board 2007-02-11 10:51:33 -08:00
8250_pnp.c
8250.c [PATCH] 8250 UART backup timer 2007-02-14 08:09:52 -08:00
8250.h
21285.c
68328serial.c
68328serial.h
68360serial.c
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
crisv10.c [PATCH] Char: tty_wakeup cleanup 2007-02-11 10:51:26 -08:00
crisv10.h
dz.c
dz.h
icom.c Fix small typo in drivers/serial/icom.c 2006-12-12 19:20:35 +01:00
icom.h
imx.c
ioc3_serial.c
ioc4_serial.c [PATCH] IOC3/IOC4: PCI mem space resources 2007-02-11 10:51:25 -08:00
ip22zilog.c
ip22zilog.h
Kconfig [POWERPC] Open Firmware serial port driver 2007-02-14 11:50:04 +11:00
m32r_sio_reg.h
m32r_sio.c
m32r_sio.h
Makefile [POWERPC] Open Firmware serial port driver 2007-02-14 11:50:04 +11:00
mcfserial.c
mcfserial.h
mpc52xx_uart.c [POWERPC] Fixup mp5200 drivers to match device tree changes 2007-02-13 15:35:53 +11:00
mpsc.c
mux.c
netx-serial.c
of_serial.c [POWERPC] Open Firmware serial port driver 2007-02-14 11:50:04 +11:00
pmac_zilog.c
pmac_zilog.h
pxa.c
s3c2410.c
sa1100.c
serial_core.c
serial_cs.c
serial_lh7a40x.c
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
suncore.c
suncore.h
sunhv.c
sunsab.c [SPARC64]: Fix of_iounmap() region release. 2006-12-31 14:06:05 -08:00
sunsab.h
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
uartlite.c [PATCH] drivers/serial NULL noise removal 2007-02-09 09:14:06 -08:00
v850e_uart.c
vr41xx_siu.c