Skip to content

Commit

Permalink
serial: imx: always wake up the processes in the TX callback
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Huang Shijie authored and Greg Kroah-Hartman committed Feb 13, 2014
1 parent c972d80 commit 2ad28e3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/tty/serial/imx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 2ad28e3

Please sign in to comment.