mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 21:22:09 -04:00
FROMLIST: scsi: ufs: full reinit upon resume if link was off
During suspend, if the link is put to off, it would require a full initialization during resume. This patch resets and restores both the hba and the card during initialization. Signed-off-by: Asutosh Das <asutoshd@codeaurora.org> Signed-off-by: Can Guo <cang@codeaurora.org> Acked-by: Stanley Chu <stanley.chu@mediatek.com> Reviewed-by: Bean Huo <beanhuo@micron.com> Bug: 152930830 Change-Id: I69f1dc00bb885de20e275d23418c172982fffb7e Link: https://lore.kernel.org/patchwork/patch/1218473/ Signed-off-by: Can Guo <cang@codeaurora.org>
This commit is contained in:
parent
a5ac9ed5c9
commit
57d259f657
1 changed files with 6 additions and 2 deletions
|
|
@ -8205,9 +8205,13 @@ static int ufshcd_resume(struct ufs_hba *hba, enum ufs_pm_op pm_op)
|
|||
else
|
||||
goto vendor_suspend;
|
||||
} else if (ufshcd_is_link_off(hba)) {
|
||||
ret = ufshcd_host_reset_and_restore(hba);
|
||||
/*
|
||||
* ufshcd_host_reset_and_restore() should have already
|
||||
* A full initialization of the host and the device is required
|
||||
* since the link was put to off during suspend.
|
||||
*/
|
||||
ret = ufshcd_reset_and_restore(hba);
|
||||
/*
|
||||
* ufshcd_reset_and_restore() should have already
|
||||
* set the link state as active
|
||||
*/
|
||||
if (ret || !ufshcd_is_link_active(hba))
|
||||
|
|
|
|||
Loading…
Reference in a new issue