Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d1a7ad3b authored by Can Guo's avatar Can Guo Committed by Todd Kjos
Browse files

UPSTREAM: scsi: ufs: Add device reset in link recovery path

In order to recover from hibern8 exit failure, perform a reset in link
recovery path before issuing link start-up.

Link: https://lore.kernel.org/r/1573798172-20534-2-git-send-email-cang@codeaurora.org


Reviewed-by: default avatarBean Huo <beanhuo@micron.com>
Reviewed-by: default avatarStanley Chu <stanley.chu@mediatek.com>
Signed-off-by: default avatarCan Guo <cang@codeaurora.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>

Bug: 143632303
Change-Id: I635845e97f4bcf59fb2b6f4e7c7e09af1123ce20
(cherry picked from commit ebdd1dfde5d2c9b2532ee5b393d66d8bc5f56177)
Signed-off-by: default avatarCan Guo <cang@codeaurora.org>
parent 8b2b5c66
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -3948,6 +3948,9 @@ static int ufshcd_link_recovery(struct ufs_hba *hba)
	ufshcd_set_eh_in_progress(hba);
	spin_unlock_irqrestore(hba->host->host_lock, flags);

	/* Reset the attached device */
	ufshcd_vops_device_reset(hba);

	ret = ufshcd_host_reset_and_restore(hba);

	spin_lock_irqsave(hba->host->host_lock, flags);