When using a device with UFS > 2.1 the error "invalid UFS version" is misleadingly printed in dmesg. There was a patch for this almost a year ago to which this solution was suggested, lets avoid growing a list of versions and just use a macro instead. I've also dropped that check entirely as it seems to be more misleading than useful, and hasn't been accurate for a long time. I dealt with the different encoding used for UFS 1.x by converting it to match the newer versions in ufshcd_get_ufs_version(). That means it's possible to use comparisons for version checks, e.g. if (hba->ufs_version < UFSHCI_VER(3, 0)) ... I've tested this on a device with UFS 3.0 and a device with UFS 2.1 however I don't own any older versions to test with. Caleb --- Caleb Connolly (3): scsi: ufshcd: switch to a version macro scsi: ufs: qcom: use UFSHCI_VER macro scsi: ufshcd: remove version check drivers/scsi/ufs/ufs-qcom.c | 4 +-- drivers/scsi/ufs/ufshcd.c | 65 ++++++++++++++++------------------------ drivers/scsi/ufs/ufshci.h | 16 +++++----- 3 files changed, 36 insertions(+), 49 deletions(-)