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

From: Miquel Raynal

Date: Fri Oct 23 2026 - 11:56:39 EST


On 23/10/2026 at 09:40:50 -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: 1788cf6a91d9 ("tty: serial: switch from circ_buf to kfifo")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: James Hilliard <james.hilliard1@xxxxxxxxx>

Reviewed-by: Miquel Raynal <miquel.raynal@xxxxxxxxxxx>