diff options
author | Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com> | 2011-02-22 20:03:18 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-02-22 20:22:04 -0500 |
commit | 60d1031e114a3e96e4420421e34ddc0dcd10cbae (patch) | |
tree | dec57b1c70ea18ba6f1eda148fb206fe59203155 /drivers/tty | |
parent | 9af7155bb03675ba2d4d68428a4345e0511ce8dd (diff) |
pch_uart: fix exclusive access issue
Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/pch_uart.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/tty/serial/pch_uart.c b/drivers/tty/serial/pch_uart.c index 0c95051fa0a4..da0ba0fa2b99 100644 --- a/drivers/tty/serial/pch_uart.c +++ b/drivers/tty/serial/pch_uart.c | |||
@@ -636,8 +636,7 @@ static void pch_dma_tx_complete(void *arg) | |||
636 | priv->tx_dma_use = 0; | 636 | priv->tx_dma_use = 0; |
637 | priv->nent = 0; | 637 | priv->nent = 0; |
638 | kfree(priv->sg_tx_p); | 638 | kfree(priv->sg_tx_p); |
639 | if (uart_circ_chars_pending(xmit)) | 639 | pch_uart_hal_enable_interrupt(priv, PCH_UART_HAL_TX_INT); |
640 | pch_uart_hal_enable_interrupt(priv, PCH_UART_HAL_TX_INT); | ||
641 | } | 640 | } |
642 | 641 | ||
643 | static int pop_tx(struct eg20t_port *priv, int size) | 642 | static int pop_tx(struct eg20t_port *priv, int size) |
@@ -793,6 +792,14 @@ static unsigned int dma_handle_tx(struct eg20t_port *priv) | |||
793 | return 0; | 792 | return 0; |
794 | } | 793 | } |
795 | 794 | ||
795 | if (priv->tx_dma_use) { | ||
796 | dev_dbg(priv->port.dev, "%s:Tx is not completed. (%lu)\n", | ||
797 | __func__, jiffies); | ||
798 | pch_uart_hal_disable_interrupt(priv, PCH_UART_HAL_TX_INT); | ||
799 | priv->tx_empty = 1; | ||
800 | return 0; | ||
801 | } | ||
802 | |||
796 | fifo_size = max(priv->fifo_size, 1); | 803 | fifo_size = max(priv->fifo_size, 1); |
797 | tx_empty = 1; | 804 | tx_empty = 1; |
798 | if (pop_tx_x(priv, xmit->buf)) { | 805 | if (pop_tx_x(priv, xmit->buf)) { |