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

Commit c234ea74 authored by Subhash Jadavani's avatar Subhash Jadavani
Browse files

scsi: ufs: fix leakage during link off state



Currently when we try to put the link in off/disabled state during suspend,
it seems link is not being kept in low power mode. This patch fixes the
issue by putting the link in hibern8 first (so device also puts the link in
low power mode) and then stop the host controller.

Change-Id: I157c0c0c246fb83692b57a3d8f5a7868c0703cf0
Signed-off-by: default avatarSubhash Jadavani <subhashj@codeaurora.org>
parent 91c8ba9a
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -6553,6 +6553,16 @@ static int ufshcd_link_state_transition(struct ufs_hba *hba,
	else if ((req_link_state == UIC_LINK_OFF_STATE) &&
		   (!check_for_bkops || (check_for_bkops &&
		    !hba->auto_bkops_enabled))) {
		/*
		 * Let's make sure that link is in low power mode, we are doing
		 * this currently by putting the link in Hibern8. Otherway to
		 * put the link in low power mode is to send the DME end point
		 * to device and then send the DME reset command to local
		 * unipro. But putting the link in hibern8 is much faster.
		 */
		ret = ufshcd_uic_hibern8_enter(hba);
		if (ret)
			goto out;
		/*
		 * Change controller state to "reset state" which
		 * should also put the link in off/reset state