aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorTomoya MORINAGA <tomoya.rohm@gmail.com>2012-07-06 04:19:42 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-26 16:37:14 -0400
commit9539dfb7ac1c84522fe1f79bb7dac2990f3de44a (patch)
tree3cb7dd5600b1487dfce9971b4925ceef6802d765 /drivers
parent9bc03743fff0770dc5a5324ba92e67cc377f16ca (diff)
pch_uart: Fix rx error interrupt setting issue
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/tty/serial/pch_uart.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/drivers/tty/serial/pch_uart.c b/drivers/tty/serial/pch_uart.c
index c5bc23d6ade9..2cc9b4694625 100644
--- a/drivers/tty/serial/pch_uart.c
+++ b/drivers/tty/serial/pch_uart.c
@@ -757,7 +757,8 @@ static void pch_dma_rx_complete(void *arg)
757 tty_flip_buffer_push(tty); 757 tty_flip_buffer_push(tty);
758 tty_kref_put(tty); 758 tty_kref_put(tty);
759 async_tx_ack(priv->desc_rx); 759 async_tx_ack(priv->desc_rx);
760 pch_uart_hal_enable_interrupt(priv, PCH_UART_HAL_RX_INT); 760 pch_uart_hal_enable_interrupt(priv, PCH_UART_HAL_RX_INT |
761 PCH_UART_HAL_RX_ERR_INT);
761} 762}
762 763
763static void pch_dma_tx_complete(void *arg) 764static void pch_dma_tx_complete(void *arg)
@@ -812,7 +813,8 @@ static int handle_rx_to(struct eg20t_port *priv)
812 int rx_size; 813 int rx_size;
813 int ret; 814 int ret;
814 if (!priv->start_rx) { 815 if (!priv->start_rx) {
815 pch_uart_hal_disable_interrupt(priv, PCH_UART_HAL_RX_INT); 816 pch_uart_hal_disable_interrupt(priv, PCH_UART_HAL_RX_INT |
817 PCH_UART_HAL_RX_ERR_INT);
816 return 0; 818 return 0;
817 } 819 }
818 buf = &priv->rxbuf; 820 buf = &priv->rxbuf;
@@ -1081,11 +1083,13 @@ static irqreturn_t pch_uart_interrupt(int irq, void *dev_id)
1081 case PCH_UART_IID_RDR: /* Received Data Ready */ 1083 case PCH_UART_IID_RDR: /* Received Data Ready */
1082 if (priv->use_dma) { 1084 if (priv->use_dma) {
1083 pch_uart_hal_disable_interrupt(priv, 1085 pch_uart_hal_disable_interrupt(priv,
1084 PCH_UART_HAL_RX_INT); 1086 PCH_UART_HAL_RX_INT |
1087 PCH_UART_HAL_RX_ERR_INT);
1085 ret = dma_handle_rx(priv); 1088 ret = dma_handle_rx(priv);
1086 if (!ret) 1089 if (!ret)
1087 pch_uart_hal_enable_interrupt(priv, 1090 pch_uart_hal_enable_interrupt(priv,
1088 PCH_UART_HAL_RX_INT); 1091 PCH_UART_HAL_RX_INT |
1092 PCH_UART_HAL_RX_ERR_INT);
1089 } else { 1093 } else {
1090 ret = handle_rx(priv); 1094 ret = handle_rx(priv);
1091 } 1095 }
@@ -1211,7 +1215,8 @@ static void pch_uart_stop_rx(struct uart_port *port)
1211 struct eg20t_port *priv; 1215 struct eg20t_port *priv;
1212 priv = container_of(port, struct eg20t_port, port); 1216 priv = container_of(port, struct eg20t_port, port);
1213 priv->start_rx = 0; 1217 priv->start_rx = 0;
1214 pch_uart_hal_disable_interrupt(priv, PCH_UART_HAL_RX_INT); 1218 pch_uart_hal_disable_interrupt(priv, PCH_UART_HAL_RX_INT |
1219 PCH_UART_HAL_RX_ERR_INT);
1215} 1220}
1216 1221
1217/* Enable the modem status interrupts. */ 1222/* Enable the modem status interrupts. */
@@ -1304,7 +1309,8 @@ static int pch_uart_startup(struct uart_port *port)
1304 pch_request_dma(port); 1309 pch_request_dma(port);
1305 1310
1306 priv->start_rx = 1; 1311 priv->start_rx = 1;
1307 pch_uart_hal_enable_interrupt(priv, PCH_UART_HAL_RX_INT); 1312 pch_uart_hal_enable_interrupt(priv, PCH_UART_HAL_RX_INT |
1313 PCH_UART_HAL_RX_ERR_INT);
1308 uart_update_timeout(port, CS8, default_baud); 1314 uart_update_timeout(port, CS8, default_baud);
1309 1315
1310 return 0; 1316 return 0;