Skip to content

Commit c6bb057

Browse files
tanstafelgregkh
authored andcommitted
serial: 8250: 8250_omap: Do not start RX DMA on THRI interrupt
Starting RX DMA on THRI interrupt is too early because TX may not have finished yet. This change is inspired by commit 90b8596 ("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: [email protected] Fixes: c26389f ("serial: 8250: 8250_omap: Add DMA support for UARTs on K3 SoCs") Signed-off-by: Ronald Wahl <[email protected]> Reviewed-by: Vignesh Raghavendra <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 98b1cc8 commit c6bb057

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

drivers/tty/serial/8250/8250_omap.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1298,10 +1298,12 @@ static int omap_8250_dma_handle_irq(struct uart_port *port)
12981298

12991299
status = serial_port_in(port, UART_LSR);
13001300

1301-
if (priv->habit & UART_HAS_EFR2)
1302-
am654_8250_handle_rx_dma(up, iir, status);
1303-
else
1304-
status = omap_8250_handle_rx_dma(up, iir, status);
1301+
if ((iir & 0x3f) != UART_IIR_THRI) {
1302+
if (priv->habit & UART_HAS_EFR2)
1303+
am654_8250_handle_rx_dma(up, iir, status);
1304+
else
1305+
status = omap_8250_handle_rx_dma(up, iir, status);
1306+
}
13051307

13061308
serial8250_modem_status(up);
13071309
if (status & UART_LSR_THRE && up->dma->tx_err) {

0 commit comments

Comments
 (0)