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

Commit 1f950ab0 authored by Asutosh Das's avatar Asutosh Das Committed by Can Guo
Browse files

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.

Change-Id: I37b36c51ca1b475d8f8dfd2d9b1f098c917c86e4
Signed-off-by: default avatarAsutosh Das <asutoshd@codeaurora.org>
parent 8957d187
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -9384,9 +9384,13 @@ static int ufshcd_resume(struct ufs_hba *hba, enum ufs_pm_op pm_op)
			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))