[PATCH] dirvers: scmi: poll again when transfer reach timeout
Dan Carpenter
dan.carpenter at linaro.org
Thu Jan 23 02:38:30 PST 2025
s/dirvers/drivers/
On Thu, Jan 23, 2025 at 04:33:24PM +0800, jack21 wrote:
> From: Huangjie <huangjie1663 at phytium.com.cn>
>
> 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
More information about the linux-arm-kernel
mailing list