Re: [PATCH] serial: 8250: calculate TX length before preparing DMA flow control

From: Miquel Raynal

Date: Fri Oct 23 2026 - 03:43:39 EST


Hi James,

On 22/10/2026 at 11:14:41 -06, James Hilliard <james.hilliard1@xxxxxxxxx> wrote:

> The Renesas RZ/N1 preparation hook programs the UART DMA block size from
> dma->tx_size. The generic TX path calls that hook before calculating the
> length of the new transfer, so it programs zero on the first transfer and
> the previous length on subsequent transfers.
>
> Calculate the scatterlist length before calling the preparation hook so
> the UART flow controller and DMA descriptor use the same transfer size.
>
> Fixes: aa63d786cea2 ("serial: 8250: dw: Add support for DMA flow
> controlling devices")

This is the wrong fixes. Watch out 1788cf6a91d9 ("tty: serial: switch
from circ_buf to kfifo"). This is the one moving the size assignment
after the do_prepare_tx_dma() call.

Also requires to be backported, so Cc: stable.

Thanks,
Miquèl