Thread (10 messages) 10 messages, 3 authors, 21h ago

Re: [PATCH v4] serial: 8250_omap: clear rx_running on zero-length DMA completes

From: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
Date: 2026-05-23 05:47:09
Also in: lkml

On Fri, May 22, 2026 at 12:37:25PM +0000, Matthias Feser wrote:
On AM33xx RX DMA only triggers when the FIFO reaches the
configured threshold (typically 48 bytes). For smaller bursts
no DMA request is issued and the FIFO is drained by RX timeout.

In this case __dma_rx_do_complete() can legitimately see count == 0.

The current code exits early in this case and does not clear
dma->rx_running, leaving the DMA state inconsistent. This can
prevent RX DMA from restarting and may cause
omap_8250_rx_dma_flush() to fail, marking DMA as broken.

Fix this by clearing dma->rx_running once the DMA transfer has
completed or been terminated, even if no data was transferred.

Signed-off-by: Matthias Feser <redacted>
Reviewed-by: Moteen Shah <redacted>
---
Changes in v4:
- Add blank line before dma->rx_running as suggested
Please properly start a new thread, don't have this patch be in reply to
another one, the "Re:" in it is a bit odd, don't you think?

And what commit id does this fix?  Should it be backported to stable
kernels?  If so, how far back?

thanks,

greg k-h
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help