Re: [PATCH v3 1/1] scsi: ufs: Remove support for old UFSHCI versions

From: Bart Van Assche
Date: Tue Apr 09 2024 - 19:28:07 EST


On 4/6/24 11:04 PM, Avri Altman wrote:
UFS spec version 2.1 was published more than 10 years ago. It is
vanishingly unlikely that even there are out there platforms that uses
earlier host controllers, let alone that those ancient platforms will
ever run a V6.10 kernel. To be extra cautious, leave out support for
UFSHCI2.0 as well, and just remove support of host controllers prior
to UFS2.0.

This patch removes some legacy tuning calls that no longer apply.

Signed-off-by: Avri Altman <avri.altman@xxxxxxx>
Acked-by: Bean Huo <beanhuo@xxxxxxxxxx>
---
drivers/ufs/core/ufshcd.c | 158 +++---------------------------------
drivers/ufs/host/ufs-qcom.c | 3 +-
include/ufs/ufshcd.h | 2 -
include/ufs/ufshci.h | 13 +--
4 files changed, 15 insertions(+), 161 deletions(-)

diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
index 62c8575f2c67..c72ef87ea867 100644
--- a/drivers/ufs/core/ufshcd.c
+++ b/drivers/ufs/core/ufshcd.c
@@ -748,8 +748,6 @@ static int ufshcd_wait_for_register(struct ufs_hba *hba, u32 reg, u32 mask,
*/
static inline u32 ufshcd_get_intr_mask(struct ufs_hba *hba)
{
- if (hba->ufs_version == ufshci_version(1, 0))
- return INTERRUPT_MASK_ALL_VER_10;
if (hba->ufs_version <= ufshci_version(2, 0))
return INTERRUPT_MASK_ALL_VER_11;

Is the patch description in sync with the patch itself? The patch
description says that support for UFSHCI 2.0 is removed while the
above if-condition only evaluates to true for UFSHCI 2.0 and older
controllers.

Thanks,

Bart.