mbox series

[v1,0/2] two changes for UFS/HPB

Message ID 20210804182128.458356-1-huobean@gmail.com
Headers show
Series two changes for UFS/HPB | expand

Message

Bean Huo Aug. 4, 2021, 6:21 p.m. UTC
From: Bean Huo <beanhuo@micron.com>

These patches are based on the Martin's git Repo 5.15/scsi-staging branch

Bean Huo (2):
  scsi: ufs: Add L2P entry swap quirk for Micron UFS in HPB READ command
  scsi: ufs: Add lu_enable sysfs node

 drivers/scsi/ufs/ufs-sysfs.c  |  3 ++-
 drivers/scsi/ufs/ufs_quirks.h |  6 ++++++
 drivers/scsi/ufs/ufshcd.c     |  3 ++-
 drivers/scsi/ufs/ufshpb.c     | 15 ++++++++++-----
 4 files changed, 20 insertions(+), 7 deletions(-)

Comments

Avri Altman Aug. 5, 2021, 6:35 a.m. UTC | #1
> From: Bean Huo <beanhuo@micron.com>

> 

> We need to check HPB being enabled on which LU from the userspace tool,

> so, add lu_enable sysfs node.

> 

> Signed-off-by: Bean Huo <beanhuo@micron.com>

Reviewed-by: Avri Altman <avri.altman@wdc.com>

Tested-by: Avri Altman <avri.altman@wdc.com>


> ---

>  drivers/scsi/ufs/ufs-sysfs.c | 3 ++-

>  1 file changed, 2 insertions(+), 1 deletion(-)

> 

> diff --git a/drivers/scsi/ufs/ufs-sysfs.c b/drivers/scsi/ufs/ufs-sysfs.c

> index 08fe037069bc..5c405ff7b6ea 100644

> --- a/drivers/scsi/ufs/ufs-sysfs.c

> +++ b/drivers/scsi/ufs/ufs-sysfs.c

> @@ -1163,6 +1163,7 @@ static DEVICE_ATTR_RO(_pname)

>  #define UFS_UNIT_DESC_PARAM(_name, _uname, _size)                      \

>         UFS_LUN_DESC_PARAM(_name, _uname, UNIT, _size)

> 

> +UFS_UNIT_DESC_PARAM(lu_enable, _LU_ENABLE, 1);

>  UFS_UNIT_DESC_PARAM(boot_lun_id, _BOOT_LUN_ID, 1);

>  UFS_UNIT_DESC_PARAM(lun_write_protect, _LU_WR_PROTECT, 1);

>  UFS_UNIT_DESC_PARAM(lun_queue_depth, _LU_Q_DEPTH, 1);

> @@ -1181,8 +1182,8 @@

> UFS_UNIT_DESC_PARAM(hpb_pinned_region_start_offset,

> _HPB_PIN_RGN_START_OFF, 2);

>  UFS_UNIT_DESC_PARAM(hpb_number_pinned_regions,

> _HPB_NUM_PIN_RGNS, 2);

>  UFS_UNIT_DESC_PARAM(wb_buf_alloc_units, _WB_BUF_ALLOC_UNITS, 4);

> 

> -

>  static struct attribute *ufs_sysfs_unit_descriptor[] = {

> +       &dev_attr_lu_enable.attr,

>         &dev_attr_boot_lun_id.attr,

>         &dev_attr_lun_write_protect.attr,

>         &dev_attr_lun_queue_depth.attr,

> --

> 2.25.1
Martin K. Petersen Aug. 6, 2021, 3:21 a.m. UTC | #2
Bean,

> These patches are based on the Martin's git Repo 5.15/scsi-staging

> branch


Applied to 5.15/scsi-staging, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering
Martin K. Petersen Aug. 10, 2021, 5:20 a.m. UTC | #3
On Wed, 4 Aug 2021 20:21:26 +0200, Bean Huo wrote:

> From: Bean Huo <beanhuo@micron.com>

> 

> These patches are based on the Martin's git Repo 5.15/scsi-staging branch

> 

> Bean Huo (2):

>   scsi: ufs: Add L2P entry swap quirk for Micron UFS in HPB READ command

>   scsi: ufs: Add lu_enable sysfs node

> 

> [...]


Applied to 5.15/scsi-queue, thanks!

[1/2] scsi: ufs: Add L2P entry swap quirk for Micron UFS in HPB READ command
      https://git.kernel.org/mkp/scsi/c/63522bf3aced
[2/2] scsi: ufs: Add lu_enable sysfs node
      https://git.kernel.org/mkp/scsi/c/f5efd4fe78de

-- 
Martin K. Petersen	Oracle Linux Engineering