Re: [PATCH v5 3/7] scsi: ufs: Fix up auto hibern8 enablement

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Can,

On Thu, 2019-11-14 at 22:09 -0800, Can Guo wrote:
> +	if (hba->ahit != ahit)
> +		hba->ahit = ahit;
>  	spin_unlock_irqrestore(hba->host->host_lock, flags);
> +	if (!pm_runtime_suspended(hba->dev)) {

Always do pm_runtime_get_sync() here could avoid possible racing?

And thus AH8 could be enabled regardless of runtime status.

> +		pm_runtime_get_sync(hba->dev);
> +		ufshcd_hold(hba, false);
> +		ufshcd_auto_hibern8_enable(hba);
> +		ufshcd_release(hba);
> +		pm_runtime_put(hba->dev);
> +	}
>  }

Thanks,
Stanley





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux