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:
parent
84bbb68e0d
commit
2d4f54de1b
1 changed files with 6 additions and 4 deletions
|
@ -1098,10 +1098,12 @@ static int msm_ufs_check_hibern8(struct ufs_hba *hba)
|
||||||
do {
|
do {
|
||||||
err = ufshcd_dme_get(hba,
|
err = ufshcd_dme_get(hba,
|
||||||
UIC_ARG_MIB(MPHY_TX_FSM_STATE), &tx_fsm_val);
|
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 */
|
/* sleep for max. 200us */
|
||||||
usleep_range(100, 200);
|
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
|
* we might have scheduled out for long during polling so
|
||||||
|
|
Loading…
Add table
Reference in a new issue