2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2025-01-04 11:43:54 +08:00
linux-next/drivers/tty/serial/8250
Sebastian Andrzej Siewior 0aa525d118 tty: serial: 8250_core: read only RX if there is something in the FIFO
The serial8250_do_startup() function unconditionally clears the
interrupts and for that it reads from the RX-FIFO without checking if
there is a byte in the FIFO or not. This works fine on OMAP4+ HW like
AM335x or DRA7.
OMAP3630 ES1.1 (which means probably all OMAP3 and earlier) does not like
this:

|Unhandled fault: external abort on non-linefetch (0x1028) at 0xfb020000
|Internal error: : 1028 [#1] ARM
|Modules linked in:
|CPU: 0 PID: 1 Comm: swapper Not tainted 3.16.0-00022-g7edcb57-dirty #1213
|task: de0572c0 ti: de058000 task.ti: de058000
|PC is at mem32_serial_in+0xc/0x1c
|LR is at serial8250_do_startup+0x220/0x85c
|Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
|Control: 10c5387d  Table: 80004019  DAC: 00000015
|[<c03051d4>] (mem32_serial_in) from [<c0307fe8>] (serial8250_do_startup+0x220/0x85c)
|[<c0307fe8>] (serial8250_do_startup) from [<c0309e00>] (omap_8250_startup+0x5c/0xe0)
|[<c0309e00>] (omap_8250_startup) from [<c030863c>] (serial8250_startup+0x18/0x2c)
|[<c030863c>] (serial8250_startup) from [<c030394c>] (uart_startup+0x78/0x1d8)
|[<c030394c>] (uart_startup) from [<c0304678>] (uart_open+0xe8/0x114)
|[<c0304678>] (uart_open) from [<c02e9e10>] (tty_open+0x1a8/0x5a4)

Reviewed-by: Tony Lindgren <tony@atomide.com>
Tested-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-26 18:01:56 +02:00
..
8250_accent.c
8250_acorn.c tty: remove use of __devexit 2012-11-21 15:27:46 -08:00
8250_boca.c
8250_core.c tty: serial: 8250_core: read only RX if there is something in the FIFO 2014-09-26 18:01:56 +02:00
8250_dma.c serial: 8250_dma: check the result of TX buffer mapping 2014-05-28 13:07:27 -07:00
8250_dw.c serial: 8250_dw: Add ACPI ID for Intel Braswell 2014-09-08 16:33:56 -07:00
8250_early.c tty/serial: fix 8250 early console option passing to regular console 2014-06-19 13:07:26 -07:00
8250_em.c tty: delete non-required instances of include <linux/init.h> 2014-01-07 17:05:21 -08:00
8250_exar_st16c554.c
8250_fintek.c serial: Add support for Fintek F81216A LPC to 4 UART 2014-09-08 15:26:26 -07:00
8250_fourport.c
8250_fsl.c serial: 8250: introduce up_to_u8250p() helper 2014-07-17 18:16:23 -07:00
8250_gsc.c parisc: Fix interrupt routing for C8000 serial ports 2013-07-31 23:42:32 +02:00
8250_hp300.c serial: 8250_hp300: trivial: fix symbol name in #warning message 2014-09-08 16:03:47 -07:00
8250_hub6.c
8250_mtk.c tty: serial: 8250: Add Mediatek UART driver 2014-09-10 06:59:41 -07:00
8250_pci.c serial: 8250: introduce up_to_u8250p() helper 2014-07-17 18:16:23 -07:00
8250_pnp.c tty: delete non-required instances of include <linux/init.h> 2014-01-07 17:05:21 -08:00
8250.h tty: serial: 8250_core: add run time pm 2014-09-26 18:01:56 +02:00
Kconfig tty: serial: 8250: Add Mediatek UART driver 2014-09-10 06:59:41 -07:00
Makefile tty: serial: 8250: Add Mediatek UART driver 2014-09-10 06:59:41 -07:00
serial_cs.c tty: delete non-required instances of include <linux/init.h> 2014-01-07 17:05:21 -08:00