]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
imx: serial: notify higher layers in case xmit IRQ was not called
authorFabian Godehardt <fg@emlix.com>
Thu, 11 Jun 2009 13:37:19 +0000 (14:37 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 11 Jun 2009 15:51:08 +0000 (08:51 -0700)
upper layers, namely line discipline, need to be notified
when transmission of more data is possible. For spurious
cases, where IRQ handling does not supply notification
for sure, it is given additionally here, when data has just
been transmitted and space in the buffer will most probably
be available.

Signed-off-by: Fabian Godehardt <fg@emlix.com>
Signed-off-by: Oskar Schirmer <os@emlix.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/serial/imx.c

index 6b8f12f4a7054f12f481137189b857c8ca016021..49f2e12ba58d2d35b6b967fd3f334159458e8f50 100644 (file)
@@ -308,6 +308,9 @@ static inline void imx_transmit_buffer(struct imx_port *sport)
                        break;
        }
 
+       if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
+               uart_write_wakeup(&sport->port);
+
        if (uart_circ_empty(xmit))
                imx_stop_tx(&sport->port);
 }