diff options
| author | Subhash Jadavani <subhashj@codeaurora.org> | 2014-11-10 23:43:48 -0800 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-22 10:58:01 -0700 |
| commit | 350f0a1398916bf53302fc57d8a9b68c91138247 (patch) | |
| tree | 26fa30009634e548e9f759d206df472d6684deb0 | |
| parent | a5a277f863a8bd1597557f03cd7e094406b7be2b (diff) | |
scsi: ufs: set the hibern8 on idle state at missing places
Hibern8 on idle state should be set to HIBERN8_EXITED during
initialization and also during resume if the link is reinitialized but
its missing as of now, this change takes care of it.
Change-Id: I9f3b25df3904a666f0efe9bc23f75c0c4116e960
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
| -rw-r--r-- | drivers/scsi/ufs/ufshcd.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 29c779778f4e..3d6c8c766112 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -1516,6 +1516,9 @@ out: static void ufshcd_init_hibern8_on_idle(struct ufs_hba *hba) { + /* initialize the state variable here */ + hba->hibern8_on_idle.state = HIBERN8_EXITED; + if (!ufshcd_is_hibern8_on_idle_allowed(hba)) return; @@ -1524,7 +1527,6 @@ static void ufshcd_init_hibern8_on_idle(struct ufs_hba *hba) INIT_WORK(&hba->hibern8_on_idle.exit_work, ufshcd_hibern8_exit_work); hba->hibern8_on_idle.delay_ms = 10; - hba->hibern8_on_idle.state = HIBERN8_EXITED; hba->hibern8_on_idle.is_enabled = true; hba->hibern8_on_idle.delay_attr.show = @@ -7434,6 +7436,8 @@ static int ufshcd_resume(struct ufs_hba *hba, enum ufs_pm_op pm_op) */ if (ret || !ufshcd_is_link_active(hba)) goto vendor_suspend; + /* mark link state as hibern8 exited */ + hba->hibern8_on_idle.state = HIBERN8_EXITED; } if (!ufshcd_is_ufs_dev_active(hba)) { |
