aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHuang Shijie <b32955@freescale.com>2014-01-22 03:23:37 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-02-13 13:18:48 -0500
commit2ad28e3efee21a5bbf940c83d1f0395b76bd3efb (patch)
treefef6300f24329e4a3f7a8543a31ee1c40a7e9e54
parentc972d806fddfb7852ce0d37d2ed14072b6de670b (diff)
serial: imx: always wake up the processes in the TX callback
The current code only wakes up the processes when the circle buffer has less data then the WAKEUP_CHARS. But sometimes, the circle buffer may has data more then the WAKEUP_CHARS, in such case, the processes will hang. This patch makes it always wakes up the processes in the TX callback. Signed-off-by: Huang Shijie <b32955@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/tty/serial/imx.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index d799140e53b6..dff0f0a472ea 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -496,8 +496,7 @@ static void dma_tx_callback(void *data)
496 496
497 dev_dbg(sport->port.dev, "we finish the TX DMA.\n"); 497 dev_dbg(sport->port.dev, "we finish the TX DMA.\n");
498 498
499 if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) 499 uart_write_wakeup(&sport->port);
500 uart_write_wakeup(&sport->port);
501 500
502 if (waitqueue_active(&sport->dma_wait)) { 501 if (waitqueue_active(&sport->dma_wait)) {
503 wake_up(&sport->dma_wait); 502 wake_up(&sport->dma_wait);