mbox series

[v1,0/3] Three minor fixes w.r.t suspend/resume

Message ID 1619403878-28330-1-git-send-email-cang@codeaurora.org
Headers show
Series Three minor fixes w.r.t suspend/resume | expand

Message

Can Guo April 26, 2021, 2:24 a.m. UTC
1st change can fix a possible OCP issue.
2nd and 3rd change can fix race conditions btw suspend/resume and other contexts.

Can Guo (3):
  scsi: ufs: Do not put UFS power into LPM if link is broken
  scsi: ufs: Cancel rpm_dev_flush_recheck_work during system suspend
  scsi: ufs: Narrow down fast pass in system suspend path

 drivers/scsi/ufs/ufshcd.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

Comments

Can Guo April 26, 2021, 3:33 a.m. UTC | #1
On 2021-04-26 11:17, Daejun Park wrote:
> Hi Can Guo,
> 
>> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
>> index 7ab6b12..090b654 100644
>> --- a/drivers/scsi/ufs/ufshcd.c
>> +++ b/drivers/scsi/ufs/ufshcd.c
>> @@ -9058,11 +9058,12 @@ int ufshcd_system_suspend(struct ufs_hba *hba)
>>         if (!hba->is_powered)
>>                 return 0;
>> 
>> +        cancel_delayed_work_sync(&hba->rpm_dev_flush_recheck_work);
>> +
>>         if ((ufs_get_pm_lvl_to_dev_pwr_mode(hba->spm_lvl) ==
>>              hba->curr_dev_pwr_mode) &&
>>             (ufs_get_pm_lvl_to_link_pwr_state(hba->spm_lvl) ==
>> -             hba->uic_link_state) &&
>> -             !hba->dev_info.b_rpm_dev_flush_capable)
> I think it should not be removed.
> It prevents power drain when runtime suspend and system suspend have 
> same
> power mode.
> 

I will add it back in next ver.

Thanks,
Can Guo

> Thanks,
> Daejun