From: Huang Shijie Date: Wed, 22 Jan 2014 08:23:37 +0000 (+0800) Subject: serial: imx: always wake up the processes in the TX callback X-Git-Tag: v4.14-rc1~7810^2~50 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2ad28e3efee21a5bbf940c83d1f0395b76bd3efb;p=platform%2Fkernel%2Flinux-rpi.git 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index d799140..dff0f0a 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);