lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 24 Jun 2021 09:04:33 +0300
From:   Adrian Hunter <adrian.hunter@...el.com>
To:     Can Guo <cang@...eaurora.org>, Bart Van Assche <bvanassche@....org>
Cc:     asutoshd@...eaurora.org, nguyenb@...eaurora.org,
        hongwus@...eaurora.org, ziqichen@...eaurora.org,
        linux-scsi@...r.kernel.org, kernel-team@...roid.com,
        Andy Gross <agross@...nel.org>,
        Bjorn Andersson <bjorn.andersson@...aro.org>,
        Alim Akhtar <alim.akhtar@...sung.com>,
        Avri Altman <avri.altman@....com>,
        "James E.J. Bottomley" <jejb@...ux.ibm.com>,
        "Martin K. Petersen" <martin.petersen@...cle.com>,
        Stanley Chu <stanley.chu@...iatek.com>,
        Bean Huo <beanhuo@...ron.com>,
        Jaegeuk Kim <jaegeuk@...nel.org>,
        Kiwoong Kim <kwmad.kim@...sung.com>,
        Satya Tangirala <satyat@...gle.com>,
        "open list:ARM/QUALCOMM SUPPORT" <linux-arm-msm@...r.kernel.org>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4 01/10] scsi: ufs: Rename flags pm_op_in_progress and
 is_sys_suspended

On 24/06/21 5:02 am, Can Guo wrote:
> Hi Bart,
> 
> On 2021-06-24 04:57, Bart Van Assche wrote:
>> On 6/23/21 1:05 PM, 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.
>>>
>>> My understanding is that power management operations must be submitted
>>> to one particular UFS WLUN (hba->sdev_ufs_device). That makes the "wlu_"
>>> part of the new names redundant. In other words, I like the current
>>> names better than the new names. Unless if I missed something, consider
>>> dropping this patch.
>>
>> Hi Can,
>>
>> Reviewing later patches in this series made me realize that there are
>> two families of suspend/resume functions. One family of functions
>> operates at the platform level while the other family operates at the
>> SCSI LUN level. My comments about the suspend/resume functions are as
>> follows:
>> - It seems redundant to me to have system suspend support at the SCSI
>>   LUN level (__ufshcd_wl_suspend(hba, UFS_SYSTEM_PM)) and also at the
>>   platform level. Since the platform device is a parent of the SCSI
>>   WLUN, can system suspend/resume support be left out from
>>   ufshcd_wl_pm_ops (or in other words, remove the .freeze and .thaw
>>   callbacks)? Do we really need two calls from the power management
>>   subsystem into the UFS driver for every system suspend and every
>>   system resume?
> 
> Asutosh and Adrian should be the right persons to answer this, since
> they've been working together on that huge change for 4 months -
> 
> https://lore.kernel.org/patchwork/patch/1417696/
> 
> In short, we need a dedicated suspend/resume ops for the UFS device
> W-LU because one cannot send requests (not even PM requests) after the
> device is runtime suspended - sending SSU cmds in hba suspend/resume
> cannot pass through blk_queue_enter() as SSU cmd is sent to the UFS
> device W-LU scsi device (by now it is runtime suspended) but not the
> hba device.

Yes it is quite normal to have different PM callbacks for different
devices (e.g. host controller and device controlled by host controller),
and SCSI effectively expects it that way now.

.freeze and .thaw are necessary for suspend-to-disk

> 
> Of course we can keep the old way and send the SSU cmd through a
> request queue without block layer PM initialized (hba->cmd_queue for
> example, by pointing cmd_queue->dev to the UFS device W-LU scsi device),
> but that would look like a hack.
> 
>> - Because of the device links (device_link_add()), the ufschd_wl_*()
>>   RPM callbacks are invoked after all LUNs have been suspended. I would
>>   appreciate it if the "ufshcd_wl_" prefix would be changed into
>>   "ufshcd_lun_" since that would make it more clear that these callbacks
>>   are associated with all LUNs and not only with the WLUN through which
>>   power management commands are submitted.
>>
> 
> Sure, we will do that later.
> 
> Thanks,
> 
> Can Guo.
> 
>> Thanks,
>>
>> Bart.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ