Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

scsi: ufs: core: Move link recovery for hibern8 exit failure to wl_resume

Move the link recovery trigger from ufshcd_uic_pwr_ctrl() to
__ufshcd_wl_resume(). Ensure link recovery is only attempted when hibern8
exit fails during resume, not during hibern8 enter in suspend. Improve
error handling and prevent unnecessary link recovery attempts.

Fixes: 35dabf4503b9 ("scsi: ufs: core: Use link recovery when h8 exit fails during runtime resume")
Signed-off-by: Peter Wang <peter.wang@mediatek.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Link: https://patch.msgid.link/20260223103906.2533654-1-peter.wang@mediatek.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Peter Wang and committed by
Martin K. Petersen
62c01537 30df81f2

+9 -9
+9 -9
drivers/ufs/core/ufshcd.c
··· 4390 4390 spin_unlock_irqrestore(hba->host->host_lock, flags); 4391 4391 mutex_unlock(&hba->uic_cmd_mutex); 4392 4392 4393 - /* 4394 - * If the h8 exit fails during the runtime resume process, it becomes 4395 - * stuck and cannot be recovered through the error handler. To fix 4396 - * this, use link recovery instead of the error handler. 4397 - */ 4398 - if (ret && hba->pm_op_in_progress) 4399 - ret = ufshcd_link_recovery(hba); 4400 - 4401 4393 return ret; 4402 4394 } 4403 4395 ··· 10192 10200 } else { 10193 10201 dev_err(hba->dev, "%s: hibern8 exit failed %d\n", 10194 10202 __func__, ret); 10195 - goto vendor_suspend; 10203 + /* 10204 + * If the h8 exit fails during the runtime resume 10205 + * process, it becomes stuck and cannot be recovered 10206 + * through the error handler. To fix this, use link 10207 + * recovery instead of the error handler. 10208 + */ 10209 + ret = ufshcd_link_recovery(hba); 10210 + if (ret) 10211 + goto vendor_suspend; 10196 10212 } 10197 10213 } else if (ufshcd_is_link_off(hba)) { 10198 10214 /*