]> git.ipfire.org Git - thirdparty/linux.git/commit
dmaengine: sun6i: Choose appropriate burst length under maxburst
authorChen-Yu Tsai <wens@kernel.org>
Sun, 21 Dec 2025 08:04:48 +0000 (16:04 +0800)
committerVinod Koul <vkoul@kernel.org>
Tue, 23 Dec 2025 07:00:16 +0000 (12:30 +0530)
commit7178c3586ab42693b28bb81014320a7783e5c435
tree549766c6d5738aab4577976263bf0c0cb4bcd6b3
parent98b9f207afa53aff2edb0e52910c4348b456b37d
dmaengine: sun6i: Choose appropriate burst length under maxburst

maxburst, as provided by the client, specifies the largest amount of
data that is allowed to be transferred in one burst. This limit is
normally provided to avoid a data burst overflowing the target FIFO.
It does not mean that the DMA engine can only do bursts in that size.

Let the driver pick the largest supported burst length within the
given limit. This lets the driver work correctly with some clients that
give a large maxburst value. In particular, the 8250_dw driver will give
a quarter of the UART's FIFO size as maxburst. On some systems the FIFO
size is 256 bytes, giving a maxburst of 64 bytes, while the hardware
only supports bursts of up to 16 bytes.

Signed-off-by: Chen-Yu Tsai <wens@kernel.org>
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Link: https://patch.msgid.link/20251221080450.1813479-1-wens@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/sun6i-dma.c