This is a note to let you know that I've just added the patch titled scsi: ufs: qcom: Fix the return value of ufs_qcom_ice_program_key() to the 6.7-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: scsi-ufs-qcom-fix-the-return-value-of-ufs_qcom_ice_p.patch and it can be found in the queue-6.7 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit 1a828eb11b5d657d671c289d5d3f3dcefcff23c0 Author: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx> Date: Fri Dec 8 12:28:47 2023 +0530 scsi: ufs: qcom: Fix the return value of ufs_qcom_ice_program_key() [ Upstream commit 3bf7ab4ac30c03beecf57c052e87d5a38fb8aed6 ] Currently, the function returns -EINVAL if algorithm other than AES-256-XTS is requested. But the correct error code is -EOPNOTSUPP. Fix it! Cc: Abel Vesa <abel.vesa@xxxxxxxxxx> Fixes: 56541c7c4468 ("scsi: ufs: ufs-qcom: Switch to the new ICE API") Reviewed-by: Abel Vesa <abel.vesa@xxxxxxxxxx> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx> Link: https://lore.kernel.org/r/20231208065902.11006-3-manivannan.sadhasivam@xxxxxxxxxx Tested-by: Andrew Halaney <ahalaney@xxxxxxxxxx> # sa8775p-ride Signed-off-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c index 17e24270477d..c92cdca21fe1 100644 --- a/drivers/ufs/host/ufs-qcom.c +++ b/drivers/ufs/host/ufs-qcom.c @@ -158,7 +158,7 @@ static int ufs_qcom_ice_program_key(struct ufs_hba *hba, cap = hba->crypto_cap_array[cfg->crypto_cap_idx]; if (cap.algorithm_id != UFS_CRYPTO_ALG_AES_XTS || cap.key_size != UFS_CRYPTO_KEY_SIZE_256) - return -EINVAL; + return -EOPNOTSUPP; if (config_enable) return qcom_ice_program_key(host->ice,