Re: [PATCH net-next v13 3/6] net: wwan: t9xx: Add control DMA interface
From: Wu. JackBB (GSM)
Date: Mon Nov 30 2026 - 22:07:07 EST
Hi Loic,
Thanks for taking the time to review this patch.
On Mon, Nov 30, 2026 at 6:51 PM Loic Poulain <loic.poulain@xxxxxxxxxxxxxxxx> wrote:
> > + atomic_t req_budget;
> > + /* ring_lock: serializes the producer (TRB service thread) against the
> > + * consumer (tx_done_work) over req_budget, wr_idx, free_idx and the
> > + * tx_req/GPD slots they index.
> > + */
> > + spinlock_t ring_lock;
>
> So, If serialized via this lock, is there a reason for having
> req_budget as an atomic_t rather than a regular integer?
No, there is none. Will fix in v14: req_budget becomes a u32, and
mtk_cldma_get_tx_budget(), its only reader outside the lock, reads it
under ring_lock.
Thanks,
Jack