* [PATCH] serial: imx: always wake up the processes in the TX callback
@ 2014-01-22 8:23 Huang Shijie
0 siblings, 0 replies; only message in thread
From: Huang Shijie @ 2014-01-22 8:23 UTC (permalink / raw)
To: gregkh; +Cc: linux-serial, Huang Shijie
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>
---
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 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);
--
1.7.2.rc3
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-01-22 9:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-22 8:23 [PATCH] serial: imx: always wake up the processes in the TX callback Huang Shijie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).