summaryrefslogtreecommitdiff
path: root/drivers/tty
diff options
context:
space:
mode:
authorBen Dooks <ben.dooks@codethink.co.uk>2015-11-18 17:41:19 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-12-14 06:59:48 +0300
commit39469654db20a14915a7fb33ca2ec67547011ece (patch)
tree0762a11ed2acea1d96ef21f3cd94e8965664c650 /drivers/tty
parentf1dd05c82985f9c476969598fd97cc680f18e86b (diff)
downloadlinux-39469654db20a14915a7fb33ca2ec67547011ece.tar.xz
ARM: meson: serial: check for tx-irq enabled in irq code
Ensure that if the interrupt handler is entered then only try and do tx work if the tx irq is enabled. Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> Tested-by: Carlo Caione <carlo@endlessm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/meson_uart.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/tty/serial/meson_uart.c b/drivers/tty/serial/meson_uart.c
index 6c365267e26a..b12a37bd37b6 100644
--- a/drivers/tty/serial/meson_uart.c
+++ b/drivers/tty/serial/meson_uart.c
@@ -237,8 +237,10 @@ static irqreturn_t meson_uart_interrupt(int irq, void *dev_id)
if (!(readl(port->membase + AML_UART_STATUS) & AML_UART_RX_EMPTY))
meson_receive_chars(port);
- if (!(readl(port->membase + AML_UART_STATUS) & AML_UART_TX_FULL))
- meson_uart_start_tx(port);
+ if (!(readl(port->membase + AML_UART_STATUS) & AML_UART_TX_FULL)) {
+ if (readl(port->membase + AML_UART_CONTROL) & AML_UART_TX_INT_EN)
+ meson_uart_start_tx(port);
+ }
spin_unlock(&port->lock);