Skip to content

Commit a5fd894

Browse files
Jamm02gregkh
authored andcommitted
serial: 8250: 8250_omap.c: Clear DMA RX running status only after DMA termination is done
Clear rx_running flag only after DMA teardown polling completes. In the previous implementation the flag was being cleared while hardware teardown was still in progress, creating a mismatch between software state (flag = 0, "ready") and hardware state (still terminating). Signed-off-by: Moteen Shah <m-shah@ti.com> Link: https://patch.msgid.link/20260112081829.63049-3-m-shah@ti.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 623b07b commit a5fd894

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -931,7 +931,6 @@ static void __dma_rx_do_complete(struct uart_8250_port *p)
931931
goto out;
932932

933933
cookie = dma->rx_cookie;
934-
dma->rx_running = 0;
935934

936935
/* Re-enable RX FIFO interrupt now that transfer is complete */
937936
if (priv->habit & UART_HAS_RHR_IT_DIS) {
@@ -965,6 +964,7 @@ static void __dma_rx_do_complete(struct uart_8250_port *p)
965964
goto out;
966965
ret = tty_insert_flip_string(tty_port, dma->rx_buf, count);
967966

967+
dma->rx_running = 0;
968968
p->port.icount.rx += ret;
969969
p->port.icount.buf_overrun += count - ret;
970970
out:

0 commit comments

Comments
 (0)