[PATCH 1/8] i3c: master: Make hot-join workqueue freezable to block hot-join during suspend
Frank Li
Frank.li at nxp.com
Tue May 12 09:09:23 PDT 2026
On Tue, May 12, 2026 at 03:17:25PM +0300, Adrian Hunter wrote:
> The I3C master workqueue (master->wq) is used to defer work that needs
> thread context and the bus maintenance lock, most notably Hot Join
> processing (which calls i3c_master_do_daa() to assign dynamic addresses
> to newly joined devices).
>
> Currently the workqueue keeps running across system suspend, which can
> race with the suspend path:
>
> - do_daa() may execute after the controller has been suspended,
> issuing bus transactions on a powered-down or otherwise unusable
> controller.
> - New I3C devices can be enumerated and added to the bus mid-suspend,
> registering driver model objects at a point where the I3C subsystem
> and its consumers are not prepared to handle them.
>
> Mark the workqueue WQ_FREEZABLE so its workers are frozen for the
> duration of system suspend/hibernate and resumed afterwards. This
> naturally defers any pending or newly queued Hot Join work until the
> system (and the controller) is fully resumed, closing both races
> without adding explicit suspend/resume synchronization in the master
> drivers.
>
> Update the kerneldoc for struct i3c_master_controller::wq to reflect
> that the workqueue is freezable.
>
> Signed-off-by: Adrian Hunter <adrian.hunter at intel.com>
> ---
Reviewed-by: Frank Li <Frank.Li at nxp.com>
>
More information about the linux-i3c
mailing list