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: Sujit Reddy Thumma <sthumma@codeaurora.org>
This commit is contained in:
Sujit Reddy Thumma 2013-09-07 20:25:54 +05:30 committed by David Keitel
parent 84bbb68e0d
commit 2d4f54de1b

View file

@ -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)
/* sleep for max. 200us */
usleep_range(100, 200);
} while (!err && time_before(jiffies, timeout));
if (err || tx_fsm_val == TX_FSM_HIBERN8)
break;
/* sleep for max. 200us */
usleep_range(100, 200);
} while (time_before(jiffies, timeout));
/*
* we might have scheduled out for long during polling so