linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: Sayali Lokhande <sayalil@codeaurora.org>,
	subhashj@codeaurora.org, cang@codeaurora.org,
	vivek.gautam@codeaurora.org, rnayak@codeaurora.org,
	vinholikatti@gmail.com, jejb@linux.vnet.ibm.com,
	martin.petersen@oracle.com, asutoshd@codeaurora.org,
	evgreen@chromium.org, riteshh@codeaurora.org
Cc: linux-scsi@vger.kernel.org, open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH V6] scsi: ufs: Add configfs support for UFS provisioning
Date: Tue, 17 Jul 2018 16:06:08 +0300	[thread overview]
Message-ID: <fc305cad-a0db-9c4b-9d5f-14e8e48a23b3@intel.com> (raw)
In-Reply-To: <1531734237-27421-2-git-send-email-sayalil@codeaurora.org>

On 16/07/18 12:43, Sayali Lokhande wrote:
> This patch adds configfs support to provision UFS device at
> runtime. This feature can be primarily useful in factory or
> assembly line as some devices may be required to be configured
> multiple times during initial system development phase.
> Configuration Descriptors can be written multiple times until
> bConfigDescrLock attribute is zero.
> 
> Configuration descriptor buffer consists of Device and Unit
> descriptor configurable parameters which are parsed from vendor
> specific provisioning file and then passed via configfs node at
> runtime to provision ufs device.
> CONFIG_CONFIGFS_FS needs to be enabled for using this feature.
> 
> Usage:
> 1) To read current configuration descriptor :
>    cat /config/XXXX.ufshc/ufs_provision
> 2) To provision ufs device:
>    echo <config_desc_buf> > /config/XXXX.ufshc/ufs_provision
> 
> Signed-off-by: Sayali Lokhande <sayalil@codeaurora.org>
> ---
>  Documentation/ABI/testing/configfs-driver-ufs |  18 +++
>  drivers/scsi/ufs/Kconfig                      |  10 ++
>  drivers/scsi/ufs/Makefile                     |   1 +
>  drivers/scsi/ufs/ufs-configfs.c               | 162 ++++++++++++++++++++++++++
>  drivers/scsi/ufs/ufshcd.c                     |   2 +
>  drivers/scsi/ufs/ufshcd.h                     |  19 +++
>  6 files changed, 212 insertions(+)
>  create mode 100644 Documentation/ABI/testing/configfs-driver-ufs
>  create mode 100644 drivers/scsi/ufs/ufs-configfs.c
> 
> diff --git a/Documentation/ABI/testing/configfs-driver-ufs b/Documentation/ABI/testing/configfs-driver-ufs
> new file mode 100644
> index 0000000..eeee499c
> --- /dev/null
> +++ b/Documentation/ABI/testing/configfs-driver-ufs
> @@ -0,0 +1,18 @@
> +What:		/config/ufshcd/ufs_provision
> +Date:		Jun 2018
> +KernelVersion:	4.14
> +Description:
> +		This file shows the current ufs configuration descriptor set in device.
> +		This can be used to provision ufs device if bConfigDescrLock is 0.
> +		For more details, refer 14.1.6.3 Configuration Descriptor and
> +		Table 14-12 - Unit Descriptor configurable parameters from specs for
> +		description of each configuration descriptor parameter.
> +		Configuration descriptor buffer needs to be passed in space separated
> +		format specificied as below:
> +		echo <bLength> <bDescriptorIDN> <bConfDescContinue> <bBootEnable>
> +		<bDescrAccessEn> <bInitPowerMode> <bHighPriorityLUN>
> +		<bSecureRemovalType> <bInitActiveICCLevel> <wPeriodicRTCUpdate>
> +		<0Bh:0Fh_ReservedAs_0> <bLUEnable> <bBootLunID> <bLUWriteProtect>
> +		<bMemoryType> <dNumAllocUnits> <bDataReliability> <bLogicalBlockSize>
> +		<bProvisioningType> <wContextCapabilities> <0Dh:0Fh_ReservedAs_0>
> +		> /config/XXXX.ufshc/ufs_provision
> diff --git a/drivers/scsi/ufs/Kconfig b/drivers/scsi/ufs/Kconfig
> index e27b4d4..34d89c2 100644
> --- a/drivers/scsi/ufs/Kconfig
> +++ b/drivers/scsi/ufs/Kconfig
> @@ -100,3 +100,13 @@ config SCSI_UFS_QCOM
>  
>  	  Select this if you have UFS controller on QCOM chipset.
>  	  If unsure, say N.
> +
> +config UFS_PROVISION
> +	tristate "Runtime UFS Provisioning support"
> +	depends on SCSI_UFSHCD_PLATFORM && CONFIGFS_FS

Why SCSI_UFSHCD_PLATFORM instead of SCSI_UFSHCD?

Also please cc me in future revisions.

  parent reply	other threads:[~2018-07-17 13:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1531734237-27421-1-git-send-email-sayalil@codeaurora.org>
2018-07-16  9:43 ` [PATCH V6] scsi: ufs: Add configfs support for UFS provisioning Sayali Lokhande
2018-07-16 14:02   ` Bart Van Assche
2018-07-16 14:28   ` kbuild test robot
2018-07-16 15:28   ` kbuild test robot
2018-07-17 13:06   ` Adrian Hunter [this message]
2018-07-30  8:00     ` Sayali Lokhande
2018-07-17 21:00   ` Evan Green

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fc305cad-a0db-9c4b-9d5f-14e8e48a23b3@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=asutoshd@codeaurora.org \
    --cc=cang@codeaurora.org \
    --cc=evgreen@chromium.org \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=riteshh@codeaurora.org \
    --cc=rnayak@codeaurora.org \
    --cc=sayalil@codeaurora.org \
    --cc=subhashj@codeaurora.org \
    --cc=vinholikatti@gmail.com \
    --cc=vivek.gautam@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).