diff --git a/drivers/crypto/msm/ice.c b/drivers/crypto/msm/ice.c index c60d26272824..4c63a3c9867f 100644 --- a/drivers/crypto/msm/ice.c +++ b/drivers/crypto/msm/ice.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2014-2020, The Linux Foundation. All rights reserved. +/* Copyright (c) 2014-2020,2021 The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -66,6 +66,8 @@ #define ICE_CRYPTO_CXT_FDE 1 #define ICE_CRYPTO_CXT_FBE 2 +#define ICE_FDE_KEY_INDEX 31 + static int ice_fde_flag; struct ice_clk_info { struct list_head list; @@ -147,6 +149,11 @@ static int qti_ice_setting_config(struct request *req, setting->encr_bypass = true; setting->decr_bypass = true; } + /* Qseecom now sets the FDE key to slot 31 by default, instead + * of slot 0, so use the same slot here during read/write + */ + if (cxt == ICE_CRYPTO_CXT_FDE) + setting->crypto_data.key_index = ICE_FDE_KEY_INDEX; } return 0; diff --git a/drivers/misc/qseecom.c b/drivers/misc/qseecom.c index b10d0677d2d8..21b27d4b159d 100644 --- a/drivers/misc/qseecom.c +++ b/drivers/misc/qseecom.c @@ -1,7 +1,7 @@ /* * QTI Secure Execution Environment Communicator (QSEECOM) driver * - * Copyright (c) 2012-2020, The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2021, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -94,7 +94,7 @@ #define TWO 2 #define QSEECOM_UFS_ICE_CE_NUM 10 #define QSEECOM_SDCC_ICE_CE_NUM 20 -#define QSEECOM_ICE_FDE_KEY_INDEX 0 +#define QSEECOM_ICE_FDE_KEY_INDEX 31 #define PHY_ADDR_4G (1ULL<<32)