Skip to content

Commit 815940b

Browse files
avri-altman-sndkmartinkpetersen
authored andcommitted
scsi: Revert "scsi: ufs: core: Probe for EXT_IID support"
This reverts commit 6e1d850. Although added a while ago, to date no one make use of ext_iid, specifically incorporates it in the upiu header. Therefore, remove it as it is currently unused and not serving any purpose. Signed-off-by: Avri Altman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Cc: Can Guo <[email protected]> Cc: Asutosh Das <[email protected]> Reviewed-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent d2138ea commit 815940b

File tree

4 files changed

+0
-45
lines changed

4 files changed

+0
-45
lines changed

drivers/ufs/core/ufshcd.c

-33
Original file line numberDiff line numberDiff line change
@@ -2411,12 +2411,7 @@ static inline int ufshcd_hba_capabilities(struct ufs_hba *hba)
24112411
else
24122412
hba->lsdb_sup = true;
24132413

2414-
if (!hba->mcq_sup)
2415-
return 0;
2416-
24172414
hba->mcq_capabilities = ufshcd_readl(hba, REG_MCQCAP);
2418-
hba->ext_iid_sup = FIELD_GET(MASK_EXT_IID_SUPPORT,
2419-
hba->mcq_capabilities);
24202415

24212416
return 0;
24222417
}
@@ -8120,31 +8115,6 @@ static void ufshcd_temp_notif_probe(struct ufs_hba *hba, const u8 *desc_buf)
81208115
}
81218116
}
81228117

8123-
static void ufshcd_ext_iid_probe(struct ufs_hba *hba, u8 *desc_buf)
8124-
{
8125-
struct ufs_dev_info *dev_info = &hba->dev_info;
8126-
u32 ext_ufs_feature;
8127-
u32 ext_iid_en = 0;
8128-
int err;
8129-
8130-
/* Only UFS-4.0 and above may support EXT_IID */
8131-
if (dev_info->wspecversion < 0x400)
8132-
goto out;
8133-
8134-
ext_ufs_feature = get_unaligned_be32(desc_buf +
8135-
DEVICE_DESC_PARAM_EXT_UFS_FEATURE_SUP);
8136-
if (!(ext_ufs_feature & UFS_DEV_EXT_IID_SUP))
8137-
goto out;
8138-
8139-
err = ufshcd_query_attr_retry(hba, UPIU_QUERY_OPCODE_READ_ATTR,
8140-
QUERY_ATTR_IDN_EXT_IID_EN, 0, 0, &ext_iid_en);
8141-
if (err)
8142-
dev_err(hba->dev, "failed reading bEXTIIDEn. err = %d\n", err);
8143-
8144-
out:
8145-
dev_info->b_ext_iid_en = ext_iid_en;
8146-
}
8147-
81488118
static void ufshcd_set_rtt(struct ufs_hba *hba)
81498119
{
81508120
struct ufs_dev_info *dev_info = &hba->dev_info;
@@ -8340,9 +8310,6 @@ static int ufs_get_device_desc(struct ufs_hba *hba)
83408310

83418311
ufs_init_rtc(hba, desc_buf);
83428312

8343-
if (hba->ext_iid_sup)
8344-
ufshcd_ext_iid_probe(hba, desc_buf);
8345-
83468313
/*
83478314
* ufshcd_read_string_desc returns size of the string
83488315
* reset the error value

include/ufs/ufs.h

-5
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,6 @@ enum attr_idn {
180180
QUERY_ATTR_IDN_AVAIL_WB_BUFF_SIZE = 0x1D,
181181
QUERY_ATTR_IDN_WB_BUFF_LIFE_TIME_EST = 0x1E,
182182
QUERY_ATTR_IDN_CURR_WB_BUFF_SIZE = 0x1F,
183-
QUERY_ATTR_IDN_EXT_IID_EN = 0x2A,
184183
QUERY_ATTR_IDN_TIMESTAMP = 0x30
185184
};
186185

@@ -391,7 +390,6 @@ enum {
391390
UFS_DEV_EXT_TEMP_NOTIF = BIT(6),
392391
UFS_DEV_HPB_SUPPORT = BIT(7),
393392
UFS_DEV_WRITE_BOOSTER_SUP = BIT(8),
394-
UFS_DEV_EXT_IID_SUP = BIT(16),
395393
};
396394
#define UFS_DEV_HPB_SUPPORT_VERSION 0x310
397395

@@ -585,9 +583,6 @@ struct ufs_dev_info {
585583

586584
bool b_advanced_rpmb_en;
587585

588-
/* UFS EXT_IID Enable */
589-
bool b_ext_iid_en;
590-
591586
/* UFS RTC */
592587
enum ufs_rtc_time rtc_type;
593588
time64_t rtc_time_baseline;

include/ufs/ufshcd.h

-2
Original file line numberDiff line numberDiff line change
@@ -952,7 +952,6 @@ enum ufshcd_mcq_opr {
952952
* @nr_queues: number of Queues of different queue types
953953
* @complete_put: whether or not to call ufshcd_rpm_put() from inside
954954
* ufshcd_resume_complete()
955-
* @ext_iid_sup: is EXT_IID is supported by UFSHC
956955
* @mcq_sup: is mcq supported by UFSHC
957956
* @mcq_enabled: is mcq ready to accept requests
958957
* @res: array of resource info of MCQ registers
@@ -1118,7 +1117,6 @@ struct ufs_hba {
11181117
unsigned int nr_hw_queues;
11191118
unsigned int nr_queues[HCTX_MAX_TYPES];
11201119
bool complete_put;
1121-
bool ext_iid_sup;
11221120
bool scsi_host_added;
11231121
bool mcq_sup;
11241122
bool lsdb_sup;

include/ufs/ufshci.h

-5
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,6 @@ enum {
8282
MASK_MCQ_SUPPORT = 0x40000000,
8383
};
8484

85-
/* MCQ capability mask */
86-
enum {
87-
MASK_EXT_IID_SUPPORT = 0x00000400,
88-
};
89-
9085
enum {
9186
REG_SQATTR = 0x0,
9287
REG_SQLBA = 0x4,

0 commit comments

Comments
 (0)