summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0026-pch_uart-Fix-dma-channel-unallocated-issue.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0026-pch_uart-Fix-dma-channel-unallocated-issue.patch')
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0026-pch_uart-Fix-dma-channel-unallocated-issue.patch55
1 files changed, 55 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0026-pch_uart-Fix-dma-channel-unallocated-issue.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0026-pch_uart-Fix-dma-channel-unallocated-issue.patch
new file mode 100644
index 00000000..e150ebb7
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0026-pch_uart-Fix-dma-channel-unallocated-issue.patch
@@ -0,0 +1,55 @@
1From 069f7216ddee90ddca6e1d040e58b6735f89fca6 Mon Sep 17 00:00:00 2001
2From: Tomoya MORINAGA <tomoya.rohm@gmail.com>
3Date: Thu, 12 Apr 2012 10:47:50 +0900
4Subject: [PATCH 026/165] pch_uart: Fix dma channel unallocated issue
5
6commit af6d17cdc8c89aeb3101f0d27cd32fc0592b40b2 upstream.
7
8This driver anticipates pch_uart_verify_port() is not called
9during installation.
10However, actually pch_uart_verify_port() is called during
11installation.
12As a result, memory access violation occurs like below.
13
140. initial value: use_dma=0
151. starup()
16 - dma channel is not allocated because use_dma=0
172. pch_uart_verify_port()
18 - Set use_dma=1
193. UART processing acts DMA mode because use_dma=1
20 - memory access violation occurs!
21
22This patch fixes the issue.
23
24Solution:
25Whenever pch_uart_verify_port() is called and then
26dma channel is not allocated, the channel should be allocated.
27
28Signed-off-by: Tomoya MORINAGA <tomoya.rohm@gmail.com>
29Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
30[bwh: Backported to 3.2: adjust context]
31Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
32---
33 drivers/tty/serial/pch_uart.c | 4 +++-
34 1 files changed, 3 insertions(+), 1 deletions(-)
35
36diff --git a/drivers/tty/serial/pch_uart.c b/drivers/tty/serial/pch_uart.c
37index da776a0..a4b192d 100644
38--- a/drivers/tty/serial/pch_uart.c
39+++ b/drivers/tty/serial/pch_uart.c
40@@ -1356,9 +1356,11 @@ static int pch_uart_verify_port(struct uart_port *port,
41 __func__);
42 return -EOPNOTSUPP;
43 #endif
44- priv->use_dma = 1;
45 priv->use_dma_flag = 1;
46 dev_info(priv->port.dev, "PCH UART : Use DMA Mode\n");
47+ if (!priv->use_dma)
48+ pch_request_dma(port);
49+ priv->use_dma = 1;
50 }
51
52 return 0;
53--
541.7.7.6
55