RE: [PATCH V2 3/3] scsi: ufs: Add sysfs support for ufs provision

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

 



-----Original Message-----
From: Greg Kroah-Hartman [mailto:gregkh@xxxxxxxxxxxxxxxxxxx] 
Sent: Saturday, June 09, 2018 12:55 PM
To: Sayali Lokhande <sayalil@xxxxxxxxxxxxxx>
Cc: subhashj@xxxxxxxxxxxxxx; cang@xxxxxxxxxxxxxx;
vivek.gautam@xxxxxxxxxxxxxx; rnayak@xxxxxxxxxxxxxx; vinholikatti@xxxxxxxxx;
jejb@xxxxxxxxxxxxxxxxxx; martin.petersen@xxxxxxxxxx;
asutoshd@xxxxxxxxxxxxxx; evgreen@xxxxxxxxxxxx; linux-scsi@xxxxxxxxxxxxxxx;
Stanislav Nijnikov <stanislav.nijnikov@xxxxxxx>; Adrian Hunter
<adrian.hunter@xxxxxxxxx>; open list <linux-kernel@xxxxxxxxxxxxxxx>
Subject: Re: [PATCH V2 3/3] scsi: ufs: Add sysfs support for ufs provision

On Fri, Jun 08, 2018 at 04:36:30PM +0530, Sayali Lokhande wrote:
> Add sysfs support to trigger ufs provisioning at runtime.
> Usage : echo <desc_buf> > /sys/bus/platform/drivers/*/
> 	config_descriptor/ufs_provision
> To check provisioning status:
> cat /sys/bus/platform/drivers/*/config_descriptor/ufs_provision
> 1- > Success (Reboot device to check updated provisioning)
> 
> Signed-off-by: Sayali Lokhande <sayalil@xxxxxxxxxxxxxx>
> ---
>  Documentation/ABI/testing/sysfs-driver-ufs |  16 ++++
>  drivers/scsi/ufs/ufs-sysfs.c               |  25 ++++++
>  drivers/scsi/ufs/ufs.h                     |   2 +
>  drivers/scsi/ufs/ufshcd.c                  | 128
+++++++++++++++++++++++++++++
>  drivers/scsi/ufs/ufshcd.h                  |   5 ++
>  5 files changed, 176 insertions(+)
> 
> diff --git a/Documentation/ABI/testing/sysfs-driver-ufs 
> b/Documentation/ABI/testing/sysfs-driver-ufs
> index 016724e..43419b5 100644
> --- a/Documentation/ABI/testing/sysfs-driver-ufs
> +++ b/Documentation/ABI/testing/sysfs-driver-ufs
> @@ -883,3 +883,19 @@ Contact:	Subhash Jadavani <subhashj@xxxxxxxxxxxxxx>
>  Description:	This entry shows the target state of an UFS UIC link
>  		for the chosen system power management level.
>  		The file is read only.
> +
> +What:
/sys/bus/platform/drivers/ufshcd/*/config_descriptor/ufs_provision
> +Date:		February 2018
> +Contact:	Sayali Lokhande <sayalil@xxxxxxxxxxxxxx>
> +Description:	This file shows the status of runtime ufs provisioning.
> +		This can be used to provision ufs device if bConfigDescrLock
is 0.
> +		Configuration buffer needs to be written in space separated
format
> +		specificied as:
> +		echo <bNumberLU> <bBootEnable> <bDescrAccessEn>
<bInitPowerMode>
> +		<bHighPriorityLUN> <bSecureRemovalType>
<bInitActiveICCLevel>
> +		<wPeriodicRTCUpdate> <bConfigDescrLock> <LUNum> <bLUEnable>
> +		<bBootLunID> <size_in_kb> <bDataReliability>
<bLUWriteProtect>
> +		<bMemoryType> <bLogicalBlockSize> <bProvisioningType>
> +		<wContextCapabilities> > ufs_provision

That's crazy big, please use configfs for this if you really want to
"provision" hardware with a new api.  That is what configfs was created for,
do not abuse sysfs like this, it is not a "single" value.
[Sayali] Sure. I will check and update my next patchset accordingly to use
configfs for provisioning at runtime.

thanks,

greg k-h




[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