]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
serial: 8250: 8250_omap: Clear UART_HAS_RHR_IT_DIS bit
authorRonald Wahl <ronald.wahl@raritan.com>
Tue, 31 Oct 2023 11:09:09 +0000 (12:09 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Dec 2023 17:36:49 +0000 (18:36 +0100)
commit 8973ab7a2441b286218f4a5c4c33680e2f139996 upstream.

This fixes commit 439c7183e5b9 ("serial: 8250: 8250_omap: Disable RX
interrupt after DMA enable") which unfortunately set the
UART_HAS_RHR_IT_DIS bit in the UART_OMAP_IER2 register and never
cleared it.

Cc: stable@vger.kernel.org
Fixes: 439c7183e5b9 ("serial: 8250: 8250_omap: Disable RX interrupt after DMA enable")
Signed-off-by: Ronald Wahl <ronald.wahl@raritan.com>
Reviewed-by: Vignesh Raghavendra <vigneshr@ti.com>
Link: https://lore.kernel.org/r/20231031110909.11695-1-rwahl@gmx.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_omap.c

index f114847331fe1541345e60b280115148642945ef..46841c440c8b42576c37a5d4b91e8fc1eaf240d7 100644 (file)
@@ -839,7 +839,7 @@ static void __dma_rx_do_complete(struct uart_8250_port *p)
        if (priv->habit & UART_HAS_RHR_IT_DIS) {
                reg = serial_in(p, UART_OMAP_IER2);
                reg &= ~UART_OMAP_IER2_RHR_IT_DIS;
-               serial_out(p, UART_OMAP_IER2, UART_OMAP_IER2_RHR_IT_DIS);
+               serial_out(p, UART_OMAP_IER2, reg);
        }
 
        dmaengine_tx_status(rxchan, cookie, &state);
@@ -981,7 +981,7 @@ static int omap_8250_rx_dma(struct uart_8250_port *p)
        if (priv->habit & UART_HAS_RHR_IT_DIS) {
                reg = serial_in(p, UART_OMAP_IER2);
                reg |= UART_OMAP_IER2_RHR_IT_DIS;
-               serial_out(p, UART_OMAP_IER2, UART_OMAP_IER2_RHR_IT_DIS);
+               serial_out(p, UART_OMAP_IER2, reg);
        }
 
        dma_async_issue_pending(dma->rxchan);