Re: [PATCH v2] scsi: ufs: core: call hibern8 notify when hibern8 cmd failed
From: Bart Van Assche
Date: Wed Apr 29 2026 - 12:23:41 EST
On 4/29/26 4:23 AM, Hongjie Fang wrote:
diff --git a/include/ufs/ufshcd.h b/include/ufs/ufshcd.h
index 8563b6648976..c1cb30d8aa4a 100644
--- a/include/ufs/ufshcd.h
+++ b/include/ufs/ufshcd.h
@@ -355,7 +355,8 @@ struct ufs_hba_variant_ops {
bool is_scsi_cmd);
void (*setup_task_mgmt)(struct ufs_hba *, int, u8);
void (*hibern8_notify)(struct ufs_hba *, enum uic_cmd_dme,
- enum ufs_notify_change_status);
+ enum ufs_notify_change_status,
+ int cmd_ret);
int (*apply_dev_quirks)(struct ufs_hba *hba);
void (*fixup_dev_quirks)(struct ufs_hba *hba);
int (*suspend)(struct ufs_hba *, enum ufs_pm_op,
Passing the full 'cmd_ret' value to the hibern8_notify vendor operation may make the UFS driver harder to maintain than necessary.
Implementations of this vendor operation may test for specific values of
'cmd_ret'. Hence, when making any change in the code that calls
.hibern8_notify() regarding the return value, all implementations of
.hibern8_notify() would have to be reviewed.
Has it been considered to add a third value in enum ufs_notify_change_status, e.g. ROLLBACK_CHANGE? That should be
sufficient for hibern8_notify implementations, isn't it?
Thanks,
Bart.