summaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorRonald Wahl <ronald.wahl@raritan.com>2023-11-01 18:14:31 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-12-13 18:39:28 +0100
commitd59dafa9eb12e0a558ea7d7d561ddcd0c9c2a29e (patch)
tree219686c9ca05a18bfd696bd56f685c9bf6b1f525 /drivers/tty
parent638a6cbacefd13700c9315c4264d5f928c6204b1 (diff)
downloadlinux-stable-d59dafa9eb12e0a558ea7d7d561ddcd0c9c2a29e.tar.gz
linux-stable-d59dafa9eb12e0a558ea7d7d561ddcd0c9c2a29e.tar.bz2
linux-stable-d59dafa9eb12e0a558ea7d7d561ddcd0c9c2a29e.zip
serial: 8250: 8250_omap: Do not start RX DMA on THRI interrupt
commit c6bb057418876cdfdd29a6f7b8cef54539ee8811 upstream. Starting RX DMA on THRI interrupt is too early because TX may not have finished yet. This change is inspired by commit 90b8596ac460 ("serial: 8250: Prevent starting up DMA Rx on THRI interrupt") and fixes DMA issues I had with an AM62 SoC that is using the 8250 OMAP variant. Cc: stable@vger.kernel.org Fixes: c26389f998a8 ("serial: 8250: 8250_omap: Add DMA support for UARTs on K3 SoCs") Signed-off-by: Ronald Wahl <ronald.wahl@raritan.com> Reviewed-by: Vignesh Raghavendra <vigneshr@ti.com> Link: https://lore.kernel.org/r/20231101171431.16495-1-rwahl@gmx.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/8250/8250_omap.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/tty/serial/8250/8250_omap.c b/drivers/tty/serial/8250/8250_omap.c
index 66b7b87a16b7..0b04d810b3e6 100644
--- a/drivers/tty/serial/8250/8250_omap.c
+++ b/drivers/tty/serial/8250/8250_omap.c
@@ -1186,10 +1186,12 @@ static int omap_8250_dma_handle_irq(struct uart_port *port)
status = serial_port_in(port, UART_LSR);
- if (priv->habit & UART_HAS_EFR2)
- am654_8250_handle_rx_dma(up, iir, status);
- else
- status = omap_8250_handle_rx_dma(up, iir, status);
+ if ((iir & 0x3f) != UART_IIR_THRI) {
+ if (priv->habit & UART_HAS_EFR2)
+ am654_8250_handle_rx_dma(up, iir, status);
+ else
+ status = omap_8250_handle_rx_dma(up, iir, status);
+ }
serial8250_modem_status(up);
if (status & UART_LSR_THRE && up->dma->tx_err) {