Re: [PATCH v4] serial: 8250_omap: clear rx_running on zero-length DMA completes
From: gregkh@xxxxxxxxxxxxxxxxxxx
Date: Sat May 23 2026 - 01:47:14 EST
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 <mfe@xxxxxxxxxxxxxxxxxxxxxxxxx>
> Reviewed-by: Moteen Shah <m-shah@xxxxxx>
> ---
> 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