OSDN Git Service
(root)
/
tomoyo
/
tomoyo-test1.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
[tomoyo/tomoyo-test1.git]
/
drivers
/
scsi
/
ufs
/
ufshcd.c
diff --git
a/drivers/scsi/ufs/ufshcd.c
b/drivers/scsi/ufs/ufshcd.c
index
64e42ef
..
698e8d2
100644
(file)
--- a/
drivers/scsi/ufs/ufshcd.c
+++ b/
drivers/scsi/ufs/ufshcd.c
@@
-3906,18
+3906,25
@@
EXPORT_SYMBOL_GPL(ufshcd_uic_hibern8_exit);
void ufshcd_auto_hibern8_update(struct ufs_hba *hba, u32 ahit)
{
unsigned long flags;
void ufshcd_auto_hibern8_update(struct ufs_hba *hba, u32 ahit)
{
unsigned long flags;
+ bool update = false;
- if (!
(hba->capabilities & MASK_AUTO_HIBERN8_SUPPORT
))
+ if (!
ufshcd_is_auto_hibern8_supported(hba
))
return;
spin_lock_irqsave(hba->host->host_lock, flags);
return;
spin_lock_irqsave(hba->host->host_lock, flags);
- if (hba->ahit == ahit)
- goto out_unlock;
- hba->ahit = ahit;
- if (!pm_runtime_suspended(hba->dev))
- ufshcd_writel(hba, hba->ahit, REG_AUTO_HIBERNATE_IDLE_TIMER);
-out_unlock:
+ if (hba->ahit != ahit) {
+ hba->ahit = ahit;
+ update = true;
+ }
spin_unlock_irqrestore(hba->host->host_lock, flags);
spin_unlock_irqrestore(hba->host->host_lock, flags);
+
+ if (update && !pm_runtime_suspended(hba->dev)) {
+ pm_runtime_get_sync(hba->dev);
+ ufshcd_hold(hba, false);
+ ufshcd_auto_hibern8_enable(hba);
+ ufshcd_release(hba);
+ pm_runtime_put(hba->dev);
+ }
}
EXPORT_SYMBOL_GPL(ufshcd_auto_hibern8_update);
}
EXPORT_SYMBOL_GPL(ufshcd_auto_hibern8_update);