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

Commit 5761caf4 authored by Sujit Reddy Thumma's avatar Sujit Reddy Thumma
Browse files

scsi: ufs-msm: Fix unnecessary poll during initialization



In msm_ufs_check_hibern8(), the loop never breaks until
timeout even if the tx_fsm_val is equal to expected value.

Change-Id: I6f5ee6aea2e50ff6c88547d5e651d6cccfd25212
Signed-off-by: default avatarSujit Reddy Thumma <sthumma@codeaurora.org>
parent 86155e46
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -1098,10 +1098,12 @@ static int msm_ufs_check_hibern8(struct ufs_hba *hba)
	do {
		err = ufshcd_dme_get(hba,
			UIC_ARG_MIB(MPHY_TX_FSM_STATE), &tx_fsm_val);
		if (!err &&  tx_fsm_val != TX_FSM_HIBERN8)
		if (err || tx_fsm_val == TX_FSM_HIBERN8)
			break;

		/* sleep for max. 200us */
		usleep_range(100, 200);
	} while (!err && time_before(jiffies, timeout));
	} while (time_before(jiffies, timeout));

	/*
	 * we might have scheduled out for long during polling so