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] [day] [month] [year] [list]
Date:   Thu, 2 Nov 2023 09:49:53 +0800
From:   Can Guo <quic_cang@...cinc.com>
To:     Manivannan Sadhasivam <mani@...nel.org>
CC:     <bvanassche@....org>, <stanley.chu@...iatek.com>,
        <adrian.hunter@...el.com>, <beanhuo@...ron.com>,
        <avri.altman@....com>, <junwoo80.lee@...sung.com>,
        <martin.petersen@...cle.com>, <linux-scsi@...r.kernel.org>,
        Alim Akhtar <alim.akhtar@...sung.com>,
        "James E.J. Bottomley" <jejb@...ux.ibm.com>,
        Lu Hongfei <luhongfei@...o.com>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3] scsi: ufs: ufs-sysfs: Expose UFS power info

Hi Mani,

On 11/1/2023 1:12 PM, Manivannan Sadhasivam wrote:
> On Tue, Oct 31, 2023 at 09:00:34PM -0700, Can Guo wrote:
>> Having UFS power info available in sysfs makes it easier to tell the state
>> of the link during runtime considering we have a bunch of power saving
>> features and various combinations for backward compatibility.
>>
>> Signed-off-by: Can Guo <quic_cang@...cinc.com>
> Just a nitpick below. With that addressed,
>
> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
>
>> ---
>>
>> v2 -> v3:
>> 1. For mode/gear/rate/dev_pm/link_status, print texts instead of numbers
>> 2. Removed number<->text explanations for mode/rate/gear/dev_pm/link_status in Documentation/ABI/testing/sysfs-driver-ufs
>>
>> v1 -> v2:
>> 1. Incorporated comments from Bart, Nitin and Mani.
>> 2. Added explanations for lane/mode/rate/gear/dev_pm/link_status in Documentation/ABI/testing/sysfs-driver-ufs
>>
>> ---
>>   Documentation/ABI/testing/sysfs-driver-ufs |  49 ++++++++++++
>>   drivers/ufs/core/ufs-sysfs.c               | 120 +++++++++++++++++++++++++++++
>>   include/ufs/unipro.h                       |   4 +-
>>   3 files changed, 171 insertions(+), 2 deletions(-)
>>
>> diff --git a/Documentation/ABI/testing/sysfs-driver-ufs b/Documentation/ABI/testing/sysfs-driver-ufs
>> index 0c7efaf..b73067b 100644
>> --- a/Documentation/ABI/testing/sysfs-driver-ufs
>> +++ b/Documentation/ABI/testing/sysfs-driver-ufs
>> @@ -1223,6 +1223,55 @@ Description:	This file shows the total latency (in micro seconds) of write
>>   
>>   		The file is read only.
>>   
>> +What:		/sys/bus/platform/drivers/ufshcd/*/power_info/lane
>> +What:		/sys/bus/platform/devices/*.ufs/power_info/lane
>> +Date:		September 2023
>> +Contact:	Can Guo <quic_cang@...cinc.com>
>> +Description:	This file shows how many lanes are enabled on the UFS link,
>> +		i.e., an output 2 means UFS link is operating with 2 lanes.
>> +
>> +		The file is read only.
>> +
>> +What:		/sys/bus/platform/drivers/ufshcd/*/power_info/mode
>> +What:		/sys/bus/platform/devices/*.ufs/power_info/mode
>> +Date:		September 2023
>> +Contact:	Can Guo <quic_cang@...cinc.com>
>> +Description:	This file shows the PA power mode of UFS.
>> +
>> +		The file is read only.
>> +
>> +What:		/sys/bus/platform/drivers/ufshcd/*/power_info/rate
>> +What:		/sys/bus/platform/devices/*.ufs/power_info/rate
>> +Date:		September 2023
>> +Contact:	Can Guo <quic_cang@...cinc.com>
>> +Description:	This file shows the speed rate of UFS link.
>> +
>> +		The file is read only.
>> +
>> +What:		/sys/bus/platform/drivers/ufshcd/*/power_info/gear
>> +What:		/sys/bus/platform/devices/*.ufs/power_info/gear
>> +Date:		September 2023
>> +Contact:	Can Guo <quic_cang@...cinc.com>
>> +Description:	This file shows the gear of UFS link.
>> +
>> +		The file is read only.
>> +
>> +What:		/sys/bus/platform/drivers/ufshcd/*/power_info/dev_pm
>> +What:		/sys/bus/platform/devices/*.ufs/power_info/dev_pm
>> +Date:		September 2023
>> +Contact:	Can Guo <quic_cang@...cinc.com>
>> +Description:	This file shows the UFS device power mode.
>> +
>> +		The file is read only.
>> +
>> +What:		/sys/bus/platform/drivers/ufshcd/*/power_info/link_state
>> +What:		/sys/bus/platform/devices/*.ufs/power_info/link_state
>> +Date:		September 2023
>> +Contact:	Can Guo <quic_cang@...cinc.com>
>> +Description:	This file shows the state of UFS link.
>> +
>> +		The file is read only.
>> +
>>   What:		/sys/bus/platform/drivers/ufshcd/*/device_descriptor/wb_presv_us_en
>>   What:		/sys/bus/platform/devices/*.ufs/device_descriptor/wb_presv_us_en
>>   Date:		June 2020
>> diff --git a/drivers/ufs/core/ufs-sysfs.c b/drivers/ufs/core/ufs-sysfs.c
>> index c959064..b8b5dd1 100644
>> --- a/drivers/ufs/core/ufs-sysfs.c
>> +++ b/drivers/ufs/core/ufs-sysfs.c
>> @@ -7,9 +7,56 @@
>>   #include <asm/unaligned.h>
>>   
>>   #include <ufs/ufs.h>
>> +#include <ufs/unipro.h>
>>   #include "ufs-sysfs.h"
>>   #include "ufshcd-priv.h"
>>   
>> +static const char *ufshcd_ufs_pa_pwr_mode_to_string(enum ufs_pa_pwr_mode mode)
> I don't think it is necessary to have the ufshcd_ prefix.

Done


Thanks,

Can Guo.

Powered by blists - more mailing lists