Re: [PATCH v4 01/10] scsi: ufs: Rename flags pm_op_in_progress and is_sys_suspended

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

 



On 6/28/21 12:01 AM, Can Guo wrote:
> On 2021-06-25 07:42, Bart Van Assche wrote:
>> On 6/23/21 12:35 AM, Can Guo wrote:
>>> Rename pm_op_in_progress and is_sys_suspended to
>>> wlu_pm_op_in_progress and
>>> is_wlu_sys_suspended accordingly.
>>
>> Can the is_wlu_sys_suspended member variable be removed by checking
>> dev->power.is_suspended where dev represents the WLUN?
>>
> 
> No, PM set dev->power.is_suspended to "false" even the device failed
> resuming,
> while is_wlu_sys_suspended can be used to tell that.

(+Rafael)

Hi Rafael,

In drivers/base/power/main.c we found the following code:

 End:
	error = dpm_run_callback(callback, dev, state, info);
	dev->power.is_suspended = false;

Is it a bug or a feature that dev->power.is_suspended is set to false if
dpm_run_callback() fails? I'm asking this because only clearing
dev->power.is_suspended if dpm_run_callback() returns 0 would allow to
simplify the UFS driver. It can happen for UFS devices that runtime
resume fails and if this fails we need to track this.

Thanks,

Bart.



[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