scsi: ufs: core: Allow UFS host drivers to override the sg entry size
authorEric Biggers <ebiggers@google.com>
Thu, 8 Dec 2022 23:43:58 +0000 (15:43 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 30 Dec 2022 21:17:33 +0000 (21:17 +0000)
commitada1e653a5eae7361d95781ed812caa0c8e07dbb
tree1bfb82ff3341bfad501c1e191a9cfd31d56d8403
parentb434ecfb73ee84fbc5996d0784a4436e75b8d0fe
scsi: ufs: core: Allow UFS host drivers to override the sg entry size

Modify the UFSHCD core to allow 'struct ufshcd_sg_entry' to be
variable-length. The default is the standard length, but variants can
override ufs_hba::sg_entry_size with a larger value if there are
vendor-specific fields following the standard ones.

This is needed to support inline encryption with ufs-exynos (FMP).

Cc: Eric Biggers <ebiggers@google.com>
Reviewed-by: Avri Altman <avri.altman@wdc.com>
Signed-off-by: Eric Biggers <ebiggers@google.com>
[ bvanassche: edited commit message and introduced CONFIG_SCSI_UFS_VARIABLE_SG_ENTRY_SIZE ]
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/ufs/core/ufshcd.c
drivers/ufs/host/Kconfig
include/ufs/ufshcd.h
include/ufs/ufshci.h