Loading drivers/scsi/ufs/ufs-sysfs.c +8 −1 Original line number Diff line number Diff line Loading @@ -145,12 +145,19 @@ static u32 ufshcd_us_to_ahit(unsigned int timer) static ssize_t auto_hibern8_show(struct device *dev, struct device_attribute *attr, char *buf) { u32 ahit; struct ufs_hba *hba = dev_get_drvdata(dev); if (!ufshcd_is_auto_hibern8_supported(hba)) return -EOPNOTSUPP; return snprintf(buf, PAGE_SIZE, "%d\n", ufshcd_ahit_to_us(hba->ahit)); pm_runtime_get_sync(hba->dev); ufshcd_hold(hba, false); ahit = ufshcd_readl(hba, REG_AUTO_HIBERNATE_IDLE_TIMER); ufshcd_release(hba); pm_runtime_put_sync(hba->dev); return scnprintf(buf, PAGE_SIZE, "%d\n", ufshcd_ahit_to_us(ahit)); } static ssize_t auto_hibern8_store(struct device *dev, Loading drivers/scsi/ufs/ufshcd-qti.c +2 −2 Original line number Diff line number Diff line Loading @@ -4851,8 +4851,8 @@ void ufshcd_auto_hibern8_enable(struct ufs_hba *hba) { unsigned long flags; if (!ufshcd_is_auto_hibern8_supported(hba) || !hba->ahit || (hba->quirks & UFSHCD_QUIRK_BROKEN_AUTO_HIBERN8)) if (!ufshcd_is_auto_hibern8_supported(hba) || (hba->quirks & UFSHCD_QUIRK_BROKEN_AUTO_HIBERN8)) return; spin_lock_irqsave(hba->host->host_lock, flags); Loading drivers/scsi/ufs/ufshcd.c +2 −2 Original line number Diff line number Diff line Loading @@ -4167,8 +4167,8 @@ void ufshcd_auto_hibern8_enable(struct ufs_hba *hba) { unsigned long flags; if (!ufshcd_is_auto_hibern8_supported(hba) || !hba->ahit || (hba->quirks & UFSHCD_QUIRK_BROKEN_AUTO_HIBERN8)) if (!ufshcd_is_auto_hibern8_supported(hba) || (hba->quirks & UFSHCD_QUIRK_BROKEN_AUTO_HIBERN8)) return; spin_lock_irqsave(hba->host->host_lock, flags); Loading Loading
drivers/scsi/ufs/ufs-sysfs.c +8 −1 Original line number Diff line number Diff line Loading @@ -145,12 +145,19 @@ static u32 ufshcd_us_to_ahit(unsigned int timer) static ssize_t auto_hibern8_show(struct device *dev, struct device_attribute *attr, char *buf) { u32 ahit; struct ufs_hba *hba = dev_get_drvdata(dev); if (!ufshcd_is_auto_hibern8_supported(hba)) return -EOPNOTSUPP; return snprintf(buf, PAGE_SIZE, "%d\n", ufshcd_ahit_to_us(hba->ahit)); pm_runtime_get_sync(hba->dev); ufshcd_hold(hba, false); ahit = ufshcd_readl(hba, REG_AUTO_HIBERNATE_IDLE_TIMER); ufshcd_release(hba); pm_runtime_put_sync(hba->dev); return scnprintf(buf, PAGE_SIZE, "%d\n", ufshcd_ahit_to_us(ahit)); } static ssize_t auto_hibern8_store(struct device *dev, Loading
drivers/scsi/ufs/ufshcd-qti.c +2 −2 Original line number Diff line number Diff line Loading @@ -4851,8 +4851,8 @@ void ufshcd_auto_hibern8_enable(struct ufs_hba *hba) { unsigned long flags; if (!ufshcd_is_auto_hibern8_supported(hba) || !hba->ahit || (hba->quirks & UFSHCD_QUIRK_BROKEN_AUTO_HIBERN8)) if (!ufshcd_is_auto_hibern8_supported(hba) || (hba->quirks & UFSHCD_QUIRK_BROKEN_AUTO_HIBERN8)) return; spin_lock_irqsave(hba->host->host_lock, flags); Loading
drivers/scsi/ufs/ufshcd.c +2 −2 Original line number Diff line number Diff line Loading @@ -4167,8 +4167,8 @@ void ufshcd_auto_hibern8_enable(struct ufs_hba *hba) { unsigned long flags; if (!ufshcd_is_auto_hibern8_supported(hba) || !hba->ahit || (hba->quirks & UFSHCD_QUIRK_BROKEN_AUTO_HIBERN8)) if (!ufshcd_is_auto_hibern8_supported(hba) || (hba->quirks & UFSHCD_QUIRK_BROKEN_AUTO_HIBERN8)) return; spin_lock_irqsave(hba->host->host_lock, flags); Loading