Re: [PATCH 1/1] staging: nvec: fix power-off path to not depend on workqueue

Dan Carpenter <[email protected]> Tue, 21 Jul 2026 12:26:06 +0300
Newsgroups org.kernel.vger.linux-tegra,dev.linux.lists.linux-staging,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Tue, Jul 21, 2026 at 02:17:27PM +0530, Aayush7352 wrote:

You need to use your real name.

> nvec_power_off() uses nvec_write_async() which queues work via schedule_work().
> During system shutdown or reboot, workqueues may be frozen, so the
> AP_PWR_DOWN message never reaches the embedded controller and the
> system hangs instead of powering off.
> 
> Fix by calling nvec_request_master() directly after queuing the power-off
> messages, processing the TX queue synchronously in the power-off context.
> Also add a NULL guard for nvec_power_handle.
> 
> This addresses the TODO item "add atomic ops in order to fix shutoff/reboot
> problems" in drivers/staging/nvec/TODO.

Missing signed off by line.

> ---
  ^^^

This is a common thing where people ask the AI to fix the todo...  You
need to say under the --- cut off line that the patch has not been
tested.

The TODO is kind of vague.  "add atomic ops in order to fix
shutoff/reboot"...  I suppose this could be the fix for it??  Anyway,
Marc wrote that todo so we'll see if that's what he meant.

regards,
dan carpenter