kernel-fxtec-pro1x/drivers/tty/serial
Doug Anderson d208a3bf77 TTY: serial_core: Fix crash if DCD drop during suspend
This crash was showing up 100% of the time on Tegra CPUs when an
agetty was running on the serial port and the console was not running
on the serial port.  The reason the Tegra saw it so reliably is that
the Tegra CPU internally ties DTR to DCD/DSR.  That means when we
dropped DTR during suspend we would get always get an immediate DCD
drop.

The specific order of operations that were running:
* uart_suspend_port() would be called to put the uart in suspend mode
* we'd drop DTR (ops->set_mctrl(uport, 0)).
* the DTR drop would be looped back in the CPU to be a DCD drop.
* the DCD drop would look to the serial driver as a hangup
* the hangup would call uart_shutdown()
* ... suspend / resume happens ...
* uart_resume_port() would be called and run the code in the
  (port->flags & ASYNC_SUSPENDED) block, which would startup the port
  (and enable tx again).
* Since the UART would be available for tx, we'd immediately get
  an interrupt, eventually calling transmit_chars()
* The transmit_chars() function would crash.  The first crash would
  be a dereference of a NULL tty member, but since the port has been
  shutdown that was just a symptom.

I have proposed a patch that would fix the Tegra CPUs here (see
https://lkml.org/lkml/2011/10/11/444 - tty/serial: Prevent drop of DCD
on suspend for Tegra UARTs).  However, even with that fix it is still
possible for systems that have an externally visible DCD line to see a
crash if the DCD drops at just the right time during suspend: thus
this patch is still useful.

Signed-off-by: Doug Anderson <dianders@chromium.org>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-19 13:07:19 -07:00
..
cpm_uart TTY: serial, fix includes in some drivers 2011-09-22 15:49:26 -07:00
jsm jsm: print byte we are dequeing 2011-08-24 15:29:44 -07:00
8250.c 8250: ratelimit LSR safety check engaged warning. 2011-09-26 16:38:44 -07:00
8250.h tty/serial: Add explicit PORT_TEGRA type 2011-05-19 16:51:01 -07:00
8250_accent.c tty: remove invalid location line in file header 2011-04-19 16:33:36 -07:00
8250_acorn.c
8250_boca.c tty: remove invalid location line in file header 2011-04-19 16:33:36 -07:00
8250_dw.c tty: add a DesignWare 8250 driver 2011-08-26 11:38:46 -07:00
8250_early.c
8250_exar_st16c554.c tty: remove invalid location line in file header 2011-04-19 16:33:36 -07:00
8250_fourport.c tty: remove invalid location line in file header 2011-04-19 16:33:36 -07:00
8250_gsc.c
8250_hp300.c
8250_hub6.c tty: remove invalid location line in file header 2011-04-19 16:33:36 -07:00
8250_mca.c tty: remove invalid location line in file header 2011-04-19 16:33:36 -07:00
8250_pci.c 8250_pci: Fix kernel panic when pch_uart is disabled 2011-10-18 14:19:54 -07:00
8250_pnp.c tty: remove invalid location line in file header 2011-04-19 16:33:36 -07:00
21285.c tty: remove invalid location line in file header 2011-04-19 16:33:36 -07:00
68328serial.c TTY: irq: Remove IRQF_DISABLED 2011-09-22 16:08:57 -07:00
68328serial.h TTY: serial, remove dead code from 68328 2011-09-22 15:47:54 -07:00
altera_jtaguart.c TTY: irq: Remove IRQF_DISABLED 2011-09-22 16:08:57 -07:00
altera_uart.c TTY: irq: Remove IRQF_DISABLED 2011-09-22 16:08:57 -07:00
amba-pl010.c tty: remove invalid location line in file header 2011-04-19 16:33:36 -07:00
amba-pl011.c amba pl011: workaround for uart registers lockup 2011-07-08 15:09:23 -07:00
apbuart.c TTY: serial, fix includes in some drivers 2011-09-22 15:49:26 -07:00
apbuart.h
atmel_serial.c tty/serial: atmel_serial: bootconsole removed from auto-enumerates 2011-10-19 08:35:32 -07:00
bcm63xx_uart.c serial: bcm63xx_uart: fix irq storm after rx fifo overrun. 2011-06-16 12:01:58 -07:00
bfin_sport_uart.c TTY: irq: Remove IRQF_DISABLED 2011-09-22 16:08:57 -07:00
bfin_sport_uart.h
bfin_uart.c TTY: irq: Remove IRQF_DISABLED 2011-09-22 16:08:57 -07:00
clps711x.c tty: remove invalid location line in file header 2011-04-19 16:33:36 -07:00
crisv10.c TTY: irq: Remove IRQF_DISABLED 2011-09-22 16:08:57 -07:00
crisv10.h
dz.c TTY: serial, fix includes in some drivers 2011-09-22 15:49:26 -07:00
dz.h
icom.c TTY: irq: Remove IRQF_DISABLED 2011-09-22 16:08:57 -07:00
icom.h
ifx6x60.c net: remove mm.h inclusion from netdevice.h 2011-06-21 19:17:20 -07:00
ifx6x60.h serial: ifx6x60: minor cleanup 2011-02-17 11:16:15 -08:00
imx.c serial/imx: support to handle break character 2011-08-24 15:27:59 -07:00
ioc3_serial.c TTY: serial, fix includes in some drivers 2011-09-22 15:49:26 -07:00
ioc4_serial.c TTY: serial, fix includes in some drivers 2011-09-22 15:49:26 -07:00
ip22zilog.c Fix common misspellings 2011-03-31 11:26:23 -03:00
ip22zilog.h
Kconfig TTY: serial, move 68360 driver to staging 2011-09-22 16:00:20 -07:00
kgdboc.c kgdboc,kgdbts: strlen() doesn't count the terminator 2011-03-25 16:37:30 -05:00
lantiq.c TTY: irq: Remove IRQF_DISABLED 2011-09-22 16:08:57 -07:00
m32r_sio.c TTY: serial, fix includes in some drivers 2011-09-22 15:49:26 -07:00
m32r_sio.h
m32r_sio_reg.h
Makefile TTY: serial, move 68360 driver to staging 2011-09-22 16:00:20 -07:00
max3100.c TTY: serial, fix includes in some drivers 2011-09-22 15:49:26 -07:00
max3107-aava.c
max3107.c TTY: serial, fix includes in some drivers 2011-09-22 15:49:26 -07:00
max3107.h Fix common misspellings 2011-03-31 11:26:23 -03:00
mcf.c TTY: irq: Remove IRQF_DISABLED 2011-09-22 16:08:57 -07:00
mfd.c serial: mfd: Initconst section fixes 2011-09-22 16:05:09 -07:00
mpc52xx_uart.c TTY: irq: Remove IRQF_DISABLED 2011-09-22 16:08:57 -07:00
mpsc.c
mrst_max3110.c max3110: Fix up port->tty backreferencing 2011-08-26 11:01:15 -07:00
mrst_max3110.h max3110: add sysrq support 2011-08-26 11:01:15 -07:00
msm_serial.c TTY: msm_serial, remove unneeded console set 2011-08-23 10:34:05 -07:00
msm_serial.h tty: remove invalid location line in file header 2011-04-19 16:33:36 -07:00
msm_serial_hs.c TTY: serial, fix includes in some drivers 2011-09-22 15:49:26 -07:00
msm_smd_tty.c tty: remove invalid location line in file header 2011-04-19 16:33:36 -07:00
mux.c TTY: serial, fix includes in some drivers 2011-09-22 15:49:26 -07:00
mxs-auart.c Freescale STMP37XX/STMP378X Application UART driver: remove duplicate linux/device.h include 2011-02-15 18:35:42 +01:00
netx-serial.c tty: remove invalid location line in file header 2011-04-19 16:33:36 -07:00
nwpserial.c TTY: serial, fix includes in some drivers 2011-09-22 15:49:26 -07:00
of_serial.c Revert "tty: of_serial: add support for the DesignWare 8250" 2011-08-24 15:24:54 -07:00
omap-serial.c treewide: Convert uses of struct resource to resource_size(ptr) 2011-06-10 14:55:36 +02:00
pch_uart.c TTY: serial, fix includes in some drivers 2011-09-22 15:49:26 -07:00
pmac_zilog.c tty: remove invalid location line in file header 2011-04-19 16:33:36 -07:00
pmac_zilog.h
pnx8xxx_uart.c
pxa.c serial: pxa: work around for errata #20 2011-09-22 15:47:53 -07:00
s3c2410.c serial: Remove redundant console_initcall from s3c and s5p console drivers 2011-07-20 19:10:43 +09:00
s3c2412.c serial: Remove redundant console_initcall from s3c and s5p console drivers 2011-07-20 19:10:43 +09:00
s3c2440.c serial: Remove redundant console_initcall from s3c and s5p console drivers 2011-07-20 19:10:43 +09:00
s3c6400.c serial: Remove redundant console_initcall from s3c and s5p console drivers 2011-07-20 19:10:43 +09:00
s5pv210.c Merge branch 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6 2011-07-25 23:09:27 -07:00
sa1100.c tty: remove invalid location line in file header 2011-04-19 16:33:36 -07:00
samsung.c serial: samsung: Add unified interrupt handler for s3c64xx and later SoC's 2011-08-23 10:48:31 -07:00
samsung.h serial: samsung: Add unified interrupt handler for s3c64xx and later SoC's 2011-08-23 10:48:31 -07:00
sb1250-duart.c TTY: serial, fix includes in some drivers 2011-09-22 15:49:26 -07:00
sc26xx.c
serial_core.c TTY: serial_core: Fix crash if DCD drop during suspend 2011-10-19 13:07:19 -07:00
serial_cs.c pcmcia: Convert pcmcia_device_id declarations to const 2011-05-06 07:46:22 +02:00
serial_ks8695.c TTY: irq: Remove IRQF_DISABLED 2011-09-22 16:08:57 -07:00
serial_txx9.c TTY: serial, fix includes in some drivers 2011-09-22 15:49:26 -07:00
sh-sci.c TTY: irq: Remove IRQF_DISABLED 2011-09-22 16:08:57 -07:00
sh-sci.h serial: sh-sci: FIFO sizing helper consolidation. 2011-06-14 17:38:19 +09:00
sn_console.c TTY: irq: Remove IRQF_DISABLED 2011-09-22 16:08:57 -07:00
suncore.c
suncore.h
sunhv.c dt/serial: Eliminate users of of_platform_{,un}register_driver 2011-02-28 13:22:46 -07:00
sunsab.c dt/serial: Eliminate users of of_platform_{,un}register_driver 2011-02-28 13:22:46 -07:00
sunsab.h
sunsu.c treewide: Convert uses of struct resource to resource_size(ptr) 2011-06-10 14:55:36 +02:00
sunzilog.c Fix common misspellings 2011-03-31 11:26:23 -03:00
sunzilog.h
timbuart.c TTY: serial, fix includes in some drivers 2011-09-22 15:49:26 -07:00
timbuart.h
uartlite.c TTY: serial, fix includes in some drivers 2011-09-22 15:49:26 -07:00
ucc_uart.c TTY: serial, fix includes in some drivers 2011-09-22 15:49:26 -07:00
vr41xx_siu.c
vt8500_serial.c treewide: Convert uses of struct resource to resource_size(ptr) 2011-06-10 14:55:36 +02:00
xilinx_uartps.c TTY: serial, fix includes in some drivers 2011-09-22 15:49:26 -07:00
zs.c TTY: serial, fix includes in some drivers 2011-09-22 15:49:26 -07:00
zs.h