]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-4.19/serial-sh-sci-disable-dma-for-uart_console.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / queue-4.19 / serial-sh-sci-disable-dma-for-uart_console.patch
1 From 099506cbbc79c0bd52b19cb6b930f256dabc3950 Mon Sep 17 00:00:00 2001
2 From: "George G. Davis" <george_davis@mentor.com>
3 Date: Tue, 14 May 2019 23:29:34 -0400
4 Subject: serial: sh-sci: disable DMA for uart_console
5
6 From: George G. Davis <george_davis@mentor.com>
7
8 commit 099506cbbc79c0bd52b19cb6b930f256dabc3950 upstream.
9
10 As noted in commit 84b40e3b57ee ("serial: 8250: omap: Disable DMA for
11 console UART"), UART console lines use low-level PIO only access functions
12 which will conflict with use of the line when DMA is enabled, e.g. when
13 the console line is also used for systemd messages. So disable DMA
14 support for UART console lines.
15
16 Reported-by: Michael Rodin <mrodin@de.adit-jv.com>
17 Link: https://patchwork.kernel.org/patch/10929511/
18 Tested-by: Eugeniu Rosca <erosca@de.adit-jv.com>
19 Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
20 Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
21 Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
22 Cc: stable@vger.kernel.org
23 Signed-off-by: George G. Davis <george_davis@mentor.com>
24 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
25 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
26
27 ---
28 drivers/tty/serial/sh-sci.c | 7 +++++++
29 1 file changed, 7 insertions(+)
30
31 --- a/drivers/tty/serial/sh-sci.c
32 +++ b/drivers/tty/serial/sh-sci.c
33 @@ -1542,6 +1542,13 @@ static void sci_request_dma(struct uart_
34
35 dev_dbg(port->dev, "%s: port %d\n", __func__, port->line);
36
37 + /*
38 + * DMA on console may interfere with Kernel log messages which use
39 + * plain putchar(). So, simply don't use it with a console.
40 + */
41 + if (uart_console(port))
42 + return;
43 +
44 if (!port->dev->of_node)
45 return;
46