mirror of
https://git.yoctoproject.org/meta-ti
synced 2026-07-16 22:38:04 +00:00
df420fe6fd
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Denys Dmytriyenko <denys@ti.com> Signed-off-by: Denys Dmytriyenko <denis@denix.org>
86 lines
2.9 KiB
Diff
86 lines
2.9 KiB
Diff
From 5e59a1ea39747dfffd111ac418cb27de4047363a Mon Sep 17 00:00:00 2001
|
|
From: Tomoya MORINAGA <tomoya.rohm@gmail.com>
|
|
Date: Fri, 6 Jul 2012 17:19:42 +0900
|
|
Subject: [PATCH 68/70] pch_uart: Fix rx error interrupt setting issue
|
|
|
|
commit 9539dfb7ac1c84522fe1f79bb7dac2990f3de44a upstream.
|
|
|
|
Rx Error interrupt(E.G. parity error) is not enabled.
|
|
So, when parity error occurs, error interrupt is not occurred.
|
|
As a result, the received data is not dropped.
|
|
|
|
This patch adds enable/disable rx error interrupt code.
|
|
|
|
Signed-off-by: Tomoya MORINAGA <tomoya.rohm@gmail.com>
|
|
Acked-by: Alan Cox <alan@linux.intel.com>
|
|
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
[Backported by Tomoya MORINGA: adjusted context]
|
|
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
|
---
|
|
drivers/tty/serial/pch_uart.c | 18 ++++++++++++------
|
|
1 files changed, 12 insertions(+), 6 deletions(-)
|
|
|
|
diff --git a/drivers/tty/serial/pch_uart.c b/drivers/tty/serial/pch_uart.c
|
|
index 5ad5040..82f5760 100644
|
|
--- a/drivers/tty/serial/pch_uart.c
|
|
+++ b/drivers/tty/serial/pch_uart.c
|
|
@@ -660,7 +660,8 @@ static void pch_dma_rx_complete(void *arg)
|
|
tty_flip_buffer_push(tty);
|
|
tty_kref_put(tty);
|
|
async_tx_ack(priv->desc_rx);
|
|
- pch_uart_hal_enable_interrupt(priv, PCH_UART_HAL_RX_INT);
|
|
+ pch_uart_hal_enable_interrupt(priv, PCH_UART_HAL_RX_INT |
|
|
+ PCH_UART_HAL_RX_ERR_INT);
|
|
}
|
|
|
|
static void pch_dma_tx_complete(void *arg)
|
|
@@ -715,7 +716,8 @@ static int handle_rx_to(struct eg20t_port *priv)
|
|
int rx_size;
|
|
int ret;
|
|
if (!priv->start_rx) {
|
|
- pch_uart_hal_disable_interrupt(priv, PCH_UART_HAL_RX_INT);
|
|
+ pch_uart_hal_disable_interrupt(priv, PCH_UART_HAL_RX_INT |
|
|
+ PCH_UART_HAL_RX_ERR_INT);
|
|
return 0;
|
|
}
|
|
buf = &priv->rxbuf;
|
|
@@ -977,11 +979,13 @@ static irqreturn_t pch_uart_interrupt(int irq, void *dev_id)
|
|
case PCH_UART_IID_RDR: /* Received Data Ready */
|
|
if (priv->use_dma) {
|
|
pch_uart_hal_disable_interrupt(priv,
|
|
- PCH_UART_HAL_RX_INT);
|
|
+ PCH_UART_HAL_RX_INT |
|
|
+ PCH_UART_HAL_RX_ERR_INT);
|
|
ret = dma_handle_rx(priv);
|
|
if (!ret)
|
|
pch_uart_hal_enable_interrupt(priv,
|
|
- PCH_UART_HAL_RX_INT);
|
|
+ PCH_UART_HAL_RX_INT |
|
|
+ PCH_UART_HAL_RX_ERR_INT);
|
|
} else {
|
|
ret = handle_rx(priv);
|
|
}
|
|
@@ -1107,7 +1111,8 @@ static void pch_uart_stop_rx(struct uart_port *port)
|
|
struct eg20t_port *priv;
|
|
priv = container_of(port, struct eg20t_port, port);
|
|
priv->start_rx = 0;
|
|
- pch_uart_hal_disable_interrupt(priv, PCH_UART_HAL_RX_INT);
|
|
+ pch_uart_hal_disable_interrupt(priv, PCH_UART_HAL_RX_INT |
|
|
+ PCH_UART_HAL_RX_ERR_INT);
|
|
priv->int_dis_flag = 1;
|
|
}
|
|
|
|
@@ -1201,7 +1206,8 @@ static int pch_uart_startup(struct uart_port *port)
|
|
pch_request_dma(port);
|
|
|
|
priv->start_rx = 1;
|
|
- pch_uart_hal_enable_interrupt(priv, PCH_UART_HAL_RX_INT);
|
|
+ pch_uart_hal_enable_interrupt(priv, PCH_UART_HAL_RX_INT |
|
|
+ PCH_UART_HAL_RX_ERR_INT);
|
|
uart_update_timeout(port, CS8, default_baud);
|
|
|
|
return 0;
|
|
--
|
|
1.7.7.6
|
|
|