Re: [PATCH v4 8/8] scsi: ufs: Select INITIAL adapt for HS Gear4

From: Bart Van Assche
Date: Sat Jan 25 2020 - 22:38:21 EST


On 2020-01-22 23:25, Can Guo wrote:
> @@ -8422,7 +8433,8 @@ int ufshcd_init(struct ufs_hba *hba, void __iomem *mmio_base, unsigned int irq)
> if ((hba->ufs_version != UFSHCI_VERSION_10) &&
> (hba->ufs_version != UFSHCI_VERSION_11) &&
> (hba->ufs_version != UFSHCI_VERSION_20) &&
> - (hba->ufs_version != UFSHCI_VERSION_21))
> + (hba->ufs_version != UFSHCI_VERSION_21) &&
> + (hba->ufs_version != UFSHCI_VERSION_30))
> dev_err(hba->dev, "invalid UFS version 0x%x\n",
> hba->ufs_version);

Is the UFS specification backwards compatible? Or in other words, does
the existing driver work fine for devices with a controller that
supports a newer version of the spec? I'm asking this because in Linux
kernel driver a version check that excludes newer controller versions is
very unusual. Can the above version check be removed in its entirety?

Thanks,

Bart.