diff mbox series

[v2,3/5] scsi: ufs: add ufs_features parameter in structure ufs_dev_info

Message ID 20200416203126.1210-4-beanhuo@micron.com (mailing list archive)
State Changes Requested
Headers show
Series UFS Host Performance Booster (HPB v1.0) driver | expand

Commit Message

Bean Huo April 16, 2020, 8:31 p.m. UTC
From: Bean Huo <beanhuo@micron.com>

Make a copy of bUFSFeaturesSupport, name it ufs_features, add it
to structure ufs_dev_info.

Signed-off-by: Bean Huo <beanhuo@micron.com>
---
 drivers/scsi/ufs/ufs.h    | 2 ++
 drivers/scsi/ufs/ufshcd.c | 2 ++
 2 files changed, 4 insertions(+)

Comments

Bart Van Assche April 22, 2020, 11:13 p.m. UTC | #1
On 4/16/20 1:31 PM, huobean@gmail.com wrote:
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index 83ed2879d930..1fe7ffc1a75a 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -6625,6 +6625,8 @@ static int ufs_get_device_desc(struct ufs_hba *hba)
>   		goto out;
>   	}
>   
> +	dev_info->ufs_features = desc_buf[DEVICE_DESC_PARAM_UFS_FEAT];
> +
>   	if (desc_buf[DEVICE_DESC_PARAM_UFS_FEAT] & 0x80) {
>   		hba->dev_info.hpb_control_mode =
>   			desc_buf[DEVICE_DESC_PARAM_HPB_CTRL_MODE];
> 

Since this change is very closely related to the changes in patch 1/3, 
please merge this patch into patch 1/3.

Thanks,

Bart.
diff mbox series

Patch

diff --git a/drivers/scsi/ufs/ufs.h b/drivers/scsi/ufs/ufs.h
index 53a5e263f7c8..1f2d4b4950b8 100644
--- a/drivers/scsi/ufs/ufs.h
+++ b/drivers/scsi/ufs/ufs.h
@@ -543,6 +543,8 @@  struct ufs_dev_info {
 	u16 hpb_ver;
 	/* bHPBControl */
 	u8 hpb_control_mode;
+	/* bUFSFeaturesSupport */
+	u8 ufs_features;
 };
 
 /**
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 83ed2879d930..1fe7ffc1a75a 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -6625,6 +6625,8 @@  static int ufs_get_device_desc(struct ufs_hba *hba)
 		goto out;
 	}
 
+	dev_info->ufs_features = desc_buf[DEVICE_DESC_PARAM_UFS_FEAT];
+
 	if (desc_buf[DEVICE_DESC_PARAM_UFS_FEAT] & 0x80) {
 		hba->dev_info.hpb_control_mode =
 			desc_buf[DEVICE_DESC_PARAM_HPB_CTRL_MODE];