linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] Documentation:sysfs-ufs: Add WriteBooster documentation
@ 2020-06-09 17:17 Asutosh Das
  2020-06-14  9:53 ` Avri Altman
  2020-06-20  3:26 ` Martin K. Petersen
  0 siblings, 2 replies; 3+ messages in thread
From: Asutosh Das @ 2020-06-09 17:17 UTC (permalink / raw)
  To: gregkh, cang, martin.petersen; +Cc: linux-scsi, Asutosh Das, open list

Adds sysfs documentation for WriteBooster entries.

Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
---
 Documentation/ABI/testing/sysfs-driver-ufs | 136 +++++++++++++++++++++++++++++
 1 file changed, 136 insertions(+)

diff --git a/Documentation/ABI/testing/sysfs-driver-ufs b/Documentation/ABI/testing/sysfs-driver-ufs
index 016724e..d1a3521 100644
--- a/Documentation/ABI/testing/sysfs-driver-ufs
+++ b/Documentation/ABI/testing/sysfs-driver-ufs
@@ -883,3 +883,139 @@ Contact:	Subhash Jadavani <subhashj@codeaurora.org>
 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/*/device_descriptor/wb_presv_us_en
+Date:		June 2020
+Contact:	Asutosh Das <asutoshd@codeaurora.org>
+Description:	This entry shows if preserve user-space was configured
+		The file is read only.
+
+What:		/sys/bus/platform/drivers/ufshcd/*/device_descriptor/wb_shared_alloc_units
+Date:		June 2020
+Contact:	Asutosh Das <asutoshd@codeaurora.org>
+Description:	This entry shows the shared allocated units of WB buffer
+		The file is read only.
+
+What:		/sys/bus/platform/drivers/ufshcd/*/device_descriptor/wb_type
+Date:		June 2020
+Contact:	Asutosh Das <asutoshd@codeaurora.org>
+Description:	This entry shows the configured WB type.
+		0x1 for shared buffer mode. 0x0 for dedicated buffer mode.
+		The file is read only.
+
+What:		/sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/wb_buff_cap_adj
+Date:		June 2020
+Contact:	Asutosh Das <asutoshd@codeaurora.org>
+Description:	This entry shows the total user-space decrease in shared
+		buffer mode.
+		The value of this parameter is 3 for TLC NAND when SLC mode
+		is used as WriteBooster Buffer. 2 for MLC NAND.
+		The file is read only.
+
+What:		/sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/wb_max_alloc_units
+Date:		June 2020
+Contact:	Asutosh Das <asutoshd@codeaurora.org>
+Description:	This entry shows the Maximum total WriteBooster Buffer size
+		which is supported by the entire device.
+		The file is read only.
+
+What:		/sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/wb_max_wb_luns
+Date:		June 2020
+Contact:	Asutosh Das <asutoshd@codeaurora.org>
+Description:	This entry shows the maximum number of luns that can support
+		WriteBooster.
+		The file is read only.
+
+What:		/sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/wb_sup_red_type
+Date:		June 2020
+Contact:	Asutosh Das <asutoshd@codeaurora.org>
+Description:	The supportability of user space reduction mode
+		and preserve user space mode.
+		00h: WriteBooster Buffer can be configured only in
+		user space reduction type.
+		01h: WriteBooster Buffer can be configured only in
+		preserve user space type.
+		02h: Device can be configured in either user space
+		reduction type or preserve user space type.
+		The file is read only.
+
+What:		/sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/wb_sup_wb_type
+Date:		June 2020
+Contact:	Asutosh Das <asutoshd@codeaurora.org>
+Description:	The supportability of WriteBooster Buffer type.
+		00h: LU based WriteBooster Buffer configuration
+		01h: Single shared WriteBooster Buffer
+		configuration
+		02h: Supporting both LU based WriteBooster
+		Buffer and Single shared WriteBooster Buffer
+		configuration
+		The file is read only.
+
+What:		/sys/bus/platform/drivers/ufshcd/*/flags/wb_enable
+Date:		June 2020
+Contact:	Asutosh Das <asutoshd@codeaurora.org>
+Description:	This entry shows the status of WriteBooster.
+		0: WriteBooster is not enabled.
+		1: WriteBooster is enabled
+		The file is read only.
+
+What:		/sys/bus/platform/drivers/ufshcd/*/flags/wb_flush_en
+Date:		June 2020
+Contact:	Asutosh Das <asutoshd@codeaurora.org>
+Description:	This entry shows if flush is enabled.
+		0: Flush operation is not performed.
+		1: Flush operation is performed.
+		The file is read only.
+
+What:		/sys/bus/platform/drivers/ufshcd/*/flags/wb_flush_during_h8
+Date:		June 2020
+Contact:	Asutosh Das <asutoshd@codeaurora.org>
+Description:	Flush WriteBooster Buffer during hibernate state.
+		0: Device is not allowed to flush the
+		WriteBooster Buffer during link hibernate
+		state.
+		1: Device is allowed to flush the
+		WriteBooster Buffer during link hibernate
+		state
+		The file is read only.
+
+What:		/sys/bus/platform/drivers/ufshcd/*/attributes/wb_avail_buf
+Date:		June 2020
+Contact:	Asutosh Das <asutoshd@codeaurora.org>
+Description:	This entry shows the amount of unused WriteBooster buffer
+		available.
+		The file is read only.
+
+What:		/sys/bus/platform/drivers/ufshcd/*/attributes/wb_cur_buf
+Date:		June 2020
+Contact:	Asutosh Das <asutoshd@codeaurora.org>
+Description:	This entry shows the amount of unused current buffer.
+		The file is read only.
+
+What:		/sys/bus/platform/drivers/ufshcd/*/attributes/wb_flush_status
+Date:		June 2020
+Contact:	Asutosh Das <asutoshd@codeaurora.org>
+Description:	This entry shows the flush operation status.
+		00h: idle
+		01h: Flush operation in progress
+		02h: Flush operation stopped prematurely.
+		03h: Flush operation completed successfully
+		04h: Flush operation general failure
+		The file is read only.
+
+What:		/sys/bus/platform/drivers/ufshcd/*/attributes/wb_life_time_est
+Date:		June 2020
+Contact:	Asutosh Das <asutoshd@codeaurora.org>
+Description:	This entry shows an indication of the WriteBooster Buffer
+		lifetime based on the amount of performed program/erase cycles
+		01h: 0% - 10% WriteBooster Buffer life time used
+		...
+		0Ah: 90% - 100% WriteBooster Buffer life time used
+		The file is read only.
+
+What:		/sys/class/scsi_device/*/device/unit_descriptor/wb_buf_alloc_units
+Date:		June 2020
+Contact:	Asutosh Das <asutoshd@codeaurora.org>
+Description:	This entry shows the configured size of WriteBooster buffer.
+		0400h corresponds to 4GB.
+		The file is read only.
-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: [PATCH 1/1] Documentation:sysfs-ufs: Add WriteBooster documentation
  2020-06-09 17:17 [PATCH 1/1] Documentation:sysfs-ufs: Add WriteBooster documentation Asutosh Das
@ 2020-06-14  9:53 ` Avri Altman
  2020-06-20  3:26 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Avri Altman @ 2020-06-14  9:53 UTC (permalink / raw)
  To: Asutosh Das, gregkh, cang, martin.petersen; +Cc: linux-scsi, open list

> 
> Adds sysfs documentation for WriteBooster entries.
> 
> Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
Acked-by: Avri Altman <avri.altman@wdc.com>

Maybe insert each field following the fields of the same descriptor, attributes, flags etc.

Thanks,
Avri
 
> ---
>  Documentation/ABI/testing/sysfs-driver-ufs | 136
> +++++++++++++++++++++++++++++
>  1 file changed, 136 insertions(+)
> 
> diff --git a/Documentation/ABI/testing/sysfs-driver-ufs
> b/Documentation/ABI/testing/sysfs-driver-ufs
> index 016724e..d1a3521 100644
> --- a/Documentation/ABI/testing/sysfs-driver-ufs
> +++ b/Documentation/ABI/testing/sysfs-driver-ufs
> @@ -883,3 +883,139 @@ Contact:  Subhash Jadavani
> <subhashj@codeaurora.org>
>  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/*/device_descriptor/wb_presv_us_en
> +Date:          June 2020
> +Contact:       Asutosh Das <asutoshd@codeaurora.org>
> +Description:   This entry shows if preserve user-space was configured
> +               The file is read only.
> +
> +What:
> /sys/bus/platform/drivers/ufshcd/*/device_descriptor/wb_shared_alloc_units
> +Date:          June 2020
> +Contact:       Asutosh Das <asutoshd@codeaurora.org>
> +Description:   This entry shows the shared allocated units of WB buffer
> +               The file is read only.
> +
> +What:          /sys/bus/platform/drivers/ufshcd/*/device_descriptor/wb_type
> +Date:          June 2020
> +Contact:       Asutosh Das <asutoshd@codeaurora.org>
> +Description:   This entry shows the configured WB type.
> +               0x1 for shared buffer mode. 0x0 for dedicated buffer mode.
> +               The file is read only.
> +
> +What:
> /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/wb_buff_cap_adj
> +Date:          June 2020
> +Contact:       Asutosh Das <asutoshd@codeaurora.org>
> +Description:   This entry shows the total user-space decrease in shared
> +               buffer mode.
> +               The value of this parameter is 3 for TLC NAND when SLC mode
> +               is used as WriteBooster Buffer. 2 for MLC NAND.
> +               The file is read only.
> +
> +What:
> /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/wb_max_alloc_unit
> s
> +Date:          June 2020
> +Contact:       Asutosh Das <asutoshd@codeaurora.org>
> +Description:   This entry shows the Maximum total WriteBooster Buffer size
> +               which is supported by the entire device.
> +               The file is read only.
> +
> +What:
> /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/wb_max_wb_luns
> +Date:          June 2020
> +Contact:       Asutosh Das <asutoshd@codeaurora.org>
> +Description:   This entry shows the maximum number of luns that can
> support
> +               WriteBooster.
> +               The file is read only.
> +
> +What:
> /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/wb_sup_red_type
> +Date:          June 2020
> +Contact:       Asutosh Das <asutoshd@codeaurora.org>
> +Description:   The supportability of user space reduction mode
> +               and preserve user space mode.
> +               00h: WriteBooster Buffer can be configured only in
> +               user space reduction type.
> +               01h: WriteBooster Buffer can be configured only in
> +               preserve user space type.
> +               02h: Device can be configured in either user space
> +               reduction type or preserve user space type.
> +               The file is read only.
> +
> +What:
> /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/wb_sup_wb_type
> +Date:          June 2020
> +Contact:       Asutosh Das <asutoshd@codeaurora.org>
> +Description:   The supportability of WriteBooster Buffer type.
> +               00h: LU based WriteBooster Buffer configuration
> +               01h: Single shared WriteBooster Buffer
> +               configuration
> +               02h: Supporting both LU based WriteBooster
> +               Buffer and Single shared WriteBooster Buffer
> +               configuration
> +               The file is read only.
> +
> +What:          /sys/bus/platform/drivers/ufshcd/*/flags/wb_enable
> +Date:          June 2020
> +Contact:       Asutosh Das <asutoshd@codeaurora.org>
> +Description:   This entry shows the status of WriteBooster.
> +               0: WriteBooster is not enabled.
> +               1: WriteBooster is enabled
> +               The file is read only.
> +
> +What:          /sys/bus/platform/drivers/ufshcd/*/flags/wb_flush_en
> +Date:          June 2020
> +Contact:       Asutosh Das <asutoshd@codeaurora.org>
> +Description:   This entry shows if flush is enabled.
> +               0: Flush operation is not performed.
> +               1: Flush operation is performed.
> +               The file is read only.
> +
> +What:          /sys/bus/platform/drivers/ufshcd/*/flags/wb_flush_during_h8
> +Date:          June 2020
> +Contact:       Asutosh Das <asutoshd@codeaurora.org>
> +Description:   Flush WriteBooster Buffer during hibernate state.
> +               0: Device is not allowed to flush the
> +               WriteBooster Buffer during link hibernate
> +               state.
> +               1: Device is allowed to flush the
> +               WriteBooster Buffer during link hibernate
> +               state
> +               The file is read only.
> +
> +What:          /sys/bus/platform/drivers/ufshcd/*/attributes/wb_avail_buf
> +Date:          June 2020
> +Contact:       Asutosh Das <asutoshd@codeaurora.org>
> +Description:   This entry shows the amount of unused WriteBooster buffer
> +               available.
> +               The file is read only.
> +
> +What:          /sys/bus/platform/drivers/ufshcd/*/attributes/wb_cur_buf
> +Date:          June 2020
> +Contact:       Asutosh Das <asutoshd@codeaurora.org>
> +Description:   This entry shows the amount of unused current buffer.
> +               The file is read only.
> +
> +What:          /sys/bus/platform/drivers/ufshcd/*/attributes/wb_flush_status
> +Date:          June 2020
> +Contact:       Asutosh Das <asutoshd@codeaurora.org>
> +Description:   This entry shows the flush operation status.
> +               00h: idle
> +               01h: Flush operation in progress
> +               02h: Flush operation stopped prematurely.
> +               03h: Flush operation completed successfully
> +               04h: Flush operation general failure
> +               The file is read only.
> +
> +What:          /sys/bus/platform/drivers/ufshcd/*/attributes/wb_life_time_est
> +Date:          June 2020
> +Contact:       Asutosh Das <asutoshd@codeaurora.org>
> +Description:   This entry shows an indication of the WriteBooster Buffer
> +               lifetime based on the amount of performed program/erase cycles
> +               01h: 0% - 10% WriteBooster Buffer life time used
> +               ...
> +               0Ah: 90% - 100% WriteBooster Buffer life time used
> +               The file is read only.
> +
> +What:
> /sys/class/scsi_device/*/device/unit_descriptor/wb_buf_alloc_units
> +Date:          June 2020
> +Contact:       Asutosh Das <asutoshd@codeaurora.org>
> +Description:   This entry shows the configured size of WriteBooster buffer.
> +               0400h corresponds to 4GB.
> +               The file is read only.
> --
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux
> Foundation Collaborative Project.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] Documentation:sysfs-ufs: Add WriteBooster documentation
  2020-06-09 17:17 [PATCH 1/1] Documentation:sysfs-ufs: Add WriteBooster documentation Asutosh Das
  2020-06-14  9:53 ` Avri Altman
@ 2020-06-20  3:26 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2020-06-20  3:26 UTC (permalink / raw)
  To: cang, Asutosh Das, gregkh; +Cc: Martin K . Petersen, linux-scsi, open list

On Tue, 9 Jun 2020 10:17:46 -0700, Asutosh Das wrote:

> Adds sysfs documentation for WriteBooster entries.

Applied to 5.9/scsi-queue, thanks!

[1/1] scsi: ufs: docs: Add WriteBooster documentation
      https://git.kernel.org/mkp/scsi/c/f51853fc0682

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-06-20  3:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-09 17:17 [PATCH 1/1] Documentation:sysfs-ufs: Add WriteBooster documentation Asutosh Das
2020-06-14  9:53 ` Avri Altman
2020-06-20  3:26 ` Martin K. Petersen

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).