Re: [PATCH v5] scsi: ufs: core: call hibern8 notify when hibern8 cmd failed

From: Bart Van Assche

Date: Sun May 03 2026 - 22:31:09 EST


On 5/2/26 4:30 PM, Hongjie Fang wrote:
The vendor hibern8 notify callback always can be executed in the
PRE_CHANGE phase of hibern8 enter/exit. But it cannot be executed
in the POST_CHANGE phase if the hibern8 cmd fails.

When the hibern8 cmd fails, the vendor hibern8 notify callback
should still have the opportunity to execute.

Add a third enum ROLLBACK_CHANGE for the ufshcd_vops_hibern8_notify(),
pass the ROLLBACK_CHANGE when the hibern8 command returns a failure and
use the POST_CHANGE otherwise.

Reviewed-by: Bart Van Assche <bvanassche@xxxxxxx>