diff --git a/drivers/scsi/ufs/ufs-hisi.c b/drivers/scsi/ufs/ufs-hisi.c index c2cee73a8560..71655be7bda2 100644 --- a/drivers/scsi/ufs/ufs-hisi.c +++ b/drivers/scsi/ufs/ufs-hisi.c @@ -540,6 +540,14 @@ static int ufs_hisi_init_common(struct ufs_hba *hba) if (!host) return -ENOMEM; + /* + * Inline crypto is currently broken with ufs-hisi because the keyslots + * overlap with the vendor-specific SYS CTRL registers -- and even if + * software uses only non-overlapping keyslots, the kernel crashes when + * programming a key or a UFS error occurs on the first encrypted I/O. + */ + hba->quirks |= UFSHCD_QUIRK_BROKEN_CRYPTO; + host->hba = hba; ufshcd_set_variant(hba, host);