diff options
author | Huang Shijie <b32955@freescale.com> | 2014-01-22 16:23:37 +0800 |
---|---|---|
committer | Nitin Garg <nitin.garg@freescale.com> | 2014-04-16 08:57:26 -0500 |
commit | a07bddfc38d120266c04f4f7c5ffd51d43ca4ac5 (patch) | |
tree | 6127396d0c1c8ec387b36041a3914a9ec811881c /drivers/tty | |
parent | 03e56566595a94ca319ae382dc27cd006cf8ad2e (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>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/imx.c | 3 |
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) dev_dbg(sport->port.dev, "we finish the TX DMA.\n"); - if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) - uart_write_wakeup(&sport->port); + uart_write_wakeup(&sport->port); if (waitqueue_active(&sport->dma_wait)) { wake_up(&sport->dma_wait); |