Re: [PATCH v5 3/3] mtd: rawnand: r852: declare NAND_USES_DMA
From: Miquel Raynal
Date: Thu Nov 26 2026 - 06:03:35 EST
On 26/11/2026 at 14:02:16 +08, Ping Li <leeonion.muyu@xxxxxxxxx> wrote:
> From: leeonion.muyu@xxxxxxxxx
>
> Hi Miquel,
>
>> Wasn't in this driver a bounce buffering operation that is no
>> longer needed?
>
> With our patch in place, a vmalloc'd buffer now gets bounced by
> the core through chip->data_buf. But data_buf comes from a bare
> kmalloc(), and kmalloc() does not guarantee the returned address
> to be 512-aligned (with SLUB debug options, for instance, the
> redzone padding shifts the object placement). So the check in
> r852_do_dma() -- (unsigned long)buf & (R852_DMA_LEN - 1) -- still
> has something to catch, and I believe it cannot be removed.
>
> The second reason to keep it is that the local bounce is also the
> fallback when dma_map_single() fails.
Ok.
Please do not send new iterations in responses of your previous
patchset.
Thanks,
Miquèl