]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
ARM: meson: serial: check for tx-irq enabled in irq code
authorBen Dooks <ben.dooks@codethink.co.uk>
Wed, 18 Nov 2015 14:41:19 +0000 (14:41 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 Dec 2015 03:59:48 +0000 (19:59 -0800)
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>
drivers/tty/serial/meson_uart.c

index 6c365267e26a1f1b87491eb41cb8c43744d45cc5..b12a37bd37b630fddb6613c79992a6ec7cc8b58a 100644 (file)
@@ -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);