Re: [PATCH v3 1/1] scsi: ufs: core: Flush exception handling work when RPM level is zero
From: Peter Wang (王信友)
Date: Thu Jan 29 2026 - 08:45:26 EST
On Thu, 2026-01-29 at 15:06 +0800, Thomas Yen wrote:
> Ensure that the exception event handling work is explicitly flushed
> during suspend when the runtime power management level is set to
> UFS_PM_LVL_0.
>
> When the RPM level is zero, the device power mode and link state both
> remain active. Previously, the UFS core driver bypassed flushing
> exception event handling jobs in this configuration. This created a
> race
> condition where the driver could attempt to access the host
> controller
> to handle an exception after the system had already entered a deep
> power-down state, resulting in a system crash.
>
> Explicitly flush this work and disable auto BKOPs before the suspend
> callback proceeds. This guarantees that pending exception tasks
> complete
> and prevents illegal hardware access during the power-down sequence.
>
> Signed-off-by: Thomas Yen <thomasyen@xxxxxxxxxx>
> Cc: Stable Tree <stable@xxxxxxxxxxxxxxx>
> ---
Reviewed-by: Peter Wang <peter.wang@xxxxxxxxxxxx>