Re: [PATCH v2] bcm5974: recover from failed mode switch

From: Dmitry Torokhov

Date: Wed Feb 18 2026 - 23:38:41 EST


Hi Liam,

On Fri, Feb 13, 2026 at 10:25:40AM +0100, Liam Mitchell wrote:
> Mode switches sent before control response are ignored.
> On receiving unknown 8-byte packets, assume that mode switch was ignored
> and reset by switching to normal mode, waiting then switching back to
> wellspring mode.
>
> ---
> This patch addresses an issue where the bcm5974 driver switches modes
> before the device is ready, resulting in an unresponsive trackpad and
> "bcm5974: bad trackpad package, length: 8" repeated in logs.
>
> Discussion of issue in the thread:
> https://lore.kernel.org/linux-input/CAOQ1CL4+DP1TuLAGNsz5GdFBTHvnTg=5q=Dr2Z1OQc6RXydSYA@xxxxxxxxxxxxxx/
>
> This fix is conservative, avoiding changing existing mode-switch
> behavior because I cannot test all variations of hardware.
>
> On receiving an unknown 8-byte packet, we assume the device is not in
> wellspring mode and schedule an asynchronous mode reset.
>
> Signed-off-by: Liam Mitchell <mitchell.liam@xxxxxxxxx>
> Link: https://lore.kernel.org/linux-input/CAOQ1CL4+DP1TuLAGNsz5GdFBTHvnTg=5q=Dr2Z1OQc6RXydSYA@xxxxxxxxxxxxxx/
> ---
> Changes in v2:
> - mutex_lock -> guard(mutex)
> - dprintk -> dev_err
> - msleep -> fsleep
> - removed 0 init
> - cancel_work_sync -> disable_delayed_work_sync
> - work_struct -> delayed_work

My apologies, I did not mean to request switch to delayed work, just to
switch to disable_work_sync().

I fixed this up on my side and applied.

Thanks.

--
Dmitry