Re: [PATCH] dirvers: scmi: poll again when transfer reach timeout
From: Dan Carpenter
Date: Thu Jan 23 2025 - 05:38:42 EST
s/dirvers/drivers/
On Thu, Jan 23, 2025 at 04:33:24PM +0800, jack21 wrote:
> From: Huangjie <huangjie1663@xxxxxxxxxxxxxx>
>
> spin_until_cond() not really hold a spin lock, possible timeout may occur
> in preemption kernel when preempted after spin_until_cond().
>
> We check status again when reach timeout is reached to prevent incorrect
> jugement of timeout.
>
I suspect the real issue is that we exit the spin loop when
try_wait_for_completion(&xfer->done) is true. Probably we should add
that as a Fixes tag?:
Fixes: ed7c04c1fea3 ("firmware: arm_scmi: Handle concurrent and out-of-order messages")
Btw, the scmi_xfer_done_no_timeout() has a confusing name, because it
does timeout. Was the "_no" an accident?
regards,
dan carpenter