Hi Kyuho Choi,

Thank you for your comments.

Yes, there can be multiple use-cases where we want to re-provision a ufs device.
Some devices may be required to be configured multiple times during system 
setup or system development.
As per spec ,the host may write the Configuration Descriptors multiple times if 
bConfigDescrLock attribute is equal to zero.

In my current implementation, bConfigDescrLock attribute is parsed from input 
buffer (via sysfs at runtime) and based on parsed value,
it can be set to one to permanently lock the device configuration.
I can add an extra check to read bConfigDescrLock attribute before writing 
Configuration Descriptors with provisioning data,
as write request shall anyway fail if bConfigDescrLock value is already one.

Regards,
Sayali

-----Original Message-----
From: Kyuho Choi [mailto:[email protected]] 
Sent: Wednesday, May 23, 2018 7:10 AM
To: Sayali Lokhande <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; 
[email protected]; [email protected]; [email protected]; 
[email protected]; [email protected]; [email protected]
Subject: Re: [PATCH RFC 0/3] Add ufs provisioning support in driver

Hi Sayali,

Provisioning ufs device need to handle lock/unlock the bConfigdescrlock 
attribute. According  to UFS spec bConfigdescrlock is write once attribute. Are 
we really need this API in kernel?.

On 5/22/18, Sayali Lokhande <[email protected]> wrote:
> This change adds a new API ufshcd_do_config_device() to write 
> configuration descriptor with the provisioning data.
> Sysfs support is added in driver to trigger ufs provisioning at 
> runtime. Provisioning data is parsed from vendor specific provisioning 
> file. This parsed data is passed as a buffer via sysfs to provision 
> ufs device.
>
> Sayali Lokhande (2):
>   scsi: ufs: Add ufs provisioning support
>   scsi: ufs: Add sysfs support for ufs provision
>
> Subhash Jadavani (1):
>   scsi: ufs: set the device reference clock setting
>
>  .../devicetree/bindings/ufs/ufshcd-pltfrm.txt      |   8 +
>  drivers/scsi/ufs/ufs.h                             |  39 +++
>  drivers/scsi/ufs/ufshcd-pltfrm.c                   |  20 ++
>  drivers/scsi/ufs/ufshcd.c                          | 383
> +++++++++++++++++++++
>  drivers/scsi/ufs/ufshcd.h                          |   9 +
>  5 files changed, 459 insertions(+)
>
> --
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora 
> Forum, a Linux Foundation Collaborative Project
>
>

BR,
Kyuho Choi

Reply via email to