2023-10-30 19:26:12

by Ronald Wahl

[permalink] [raw]
Subject: [PATCH] serial: 8250: 8250_omap: Clear UART_HAS_RHR_IT_DIS bit

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.

Signed-off-by: Ronald Wahl <[email protected]>
---
drivers/tty/serial/8250/8250_omap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_omap.c b/drivers/tty/serial/8250/8250_omap.c
index ca972fd37725..c7ab2963040b 100644
--- a/drivers/tty/serial/8250/8250_omap.c
+++ b/drivers/tty/serial/8250/8250_omap.c
@@ -914,7 +914,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);
@@ -1060,7 +1060,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);
--
2.41.0


2023-10-31 06:17:43

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH] serial: 8250: 8250_omap: Clear UART_HAS_RHR_IT_DIS bit

On Mon, Oct 30, 2023 at 07:20:44PM +0100, Ronald Wahl wrote:
> 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.
>
> Signed-off-by: Ronald Wahl <[email protected]>

Can you please add a proper "Fixes:" tag?

thanks,

greg k-h