mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-31 06:14:39 +01:00
scsi: ufs: host: mediatek: Enhance recovery on resume failure
Improve the recovery process for failed resume operations. Log the device's power status and return 0 if both resume and recovery fail to prevent I/O hang. Signed-off-by: Peter Wang <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
This commit is contained in:
1 parent
faac32d4ec
commit
15ef3f5aa8
1 file changed
+14
-1
@@ -1775,8 +1775,21 @@ static int ufs_mtk_resume(struct ufs_hba *hba, enum ufs_pm_op pm_op)
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
fail:
|
||||
return ufshcd_link_recovery(hba);
|
||||
/*
|
||||
* Check if the platform (parent) device has resumed, and ensure that
|
||||
* power, clock, and MTCMOS are all turned on.
|
||||
*/
|
||||
err = ufshcd_link_recovery(hba);
|
||||
if (err) {
|
||||
dev_err(hba->dev, "Device PM: req=%d, status:%d, err:%d\n",
|
||||
hba->dev->power.request,
|
||||
hba->dev->power.runtime_status,
|
||||
hba->dev->power.runtime_error);
|
||||
}
|
||||
|
||||
return 0; /* Cannot return a failure, otherwise, the I/O will hang. */
|
||||
}
|
||||
|
||||
static void ufs_mtk_dbg_register_dump(struct ufs_hba *hba)
|
||||
|
||||
Reference in new issue
Block a user