scsi: ufs: Add inline encryption support to UFS
authorSatya Tangirala <satyat@google.com>
Mon, 6 Jul 2020 20:04:14 +0000 (20:04 +0000)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 8 Jul 2020 05:23:32 +0000 (01:23 -0400)
commitdf043c745ea149d93651210ff6fc9ac19e7a687a
tree8103795ca45bf38a49134d47572bb1defcd619d9
parent70297a8ac7a7a4a3284c2eb20fefefbe72dab338
scsi: ufs: Add inline encryption support to UFS

Wire up ufshcd.c with the UFS Crypto API, the block layer inline encryption
additions and the keyslot manager.

Many existing inline crypto devices require some additional behaviour not
specified in the UFSHCI v2.1 specification - as such the vendor specific
drivers will need to be updated where necessary to make it possible to use
those devices. Some of these changes have already been proposed upstream,
such as for the Qualcomm 845 SoC at
https://lkml.kernel.org/linux-scsi/20200501045111.665881-1-ebiggers@kernel.org/
and for ufs-mediatek at
https://lkml.kernel.org/linux-scsi/20200304022101.14165-1-stanley.chu@mediatek.com/

This patch has been tested on the db845c, sm8150-mtp and sm8250-mtp
(which have Qualcomm chipsets) and on some mediatek chipsets using these
aforementioned vendor specific driver updates.

Link: https://lore.kernel.org/r/20200706200414.2027450-4-satyat@google.com
Reviewed-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Stanley Chu <stanley.chu@mediatek.com>
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
Signed-off-by: Satya Tangirala <satyat@google.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/ufs/ufshcd-crypto.h
drivers/scsi/ufs/ufshcd.c
drivers/scsi/ufs/ufshcd.h