Re: sashiko.dev review (Re: [PATCH v4 13/17] dmaengine: sh: rz-dmac: Add cyclic DMA support)
From: Claudiu Beznea
Date: Mon May 11 2026 - 03:57:04 EST
On 4/20/26 15:51, Claudiu Beznea wrote:
> Also, because the lock is dropped when exiting the scoped_guard before
> vchan_tx_prep() is called, a concurrent terminate_all() could potentially
> clear the flag before the descriptor is queued.
> Could the driver rely on the desc->type field instead of a global state
> flag to identify cyclic transfers?
I'm going to explore that but I think this will complicates the code further.
As the channel can only accept a single cyclic transfer enqueued and no other types of transfers (since the HW cannot handle mixed cyclic and non-cyclic transfers), the exact scenario described above can only happen if the user of this channel terminates the cyclic transfer before it even prepared it. I don't think that is a valid case.
Thank you,
Claudiu