Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5c46bf0c authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ice: Add code to support older implementation"

parents 758b46f0 a38a6946
Loading
Loading
Loading
Loading
+20 −1
Original line number Diff line number Diff line
@@ -1470,10 +1470,12 @@ static int qcom_ice_config_start(struct platform_device *pdev,
		struct request *req,
		struct ice_data_setting *setting, bool async)
{
	struct ice_crypto_setting *crypto_data;
	struct ice_crypto_setting pfk_crypto_data = {0};
	int ret = 0;
	bool is_pfe = false;
	sector_t data_size;
	union map_info *info;
	unsigned long sec_end = 0;

	if (!pdev || !req) {
@@ -1510,8 +1512,25 @@ static int qcom_ice_config_start(struct platform_device *pdev,
				&pfk_crypto_data, setting);
	}

	if (ice_fde_flag == 0)
	if (!ice_fde_flag) {
		if (bio_flagged(req->bio, BIO_INLINECRYPT)) {
			info = dm_get_rq_mapinfo(req);
			if (!info) {
				pr_debug("%s info not available in request\n",
							__func__);
				return 0;
			}
			crypto_data = (struct ice_crypto_setting *)info->ptr;
			if (!crypto_data) {
				pr_err("%s crypto_data not available in req\n",
							__func__);
				return -EINVAL;
			}
			return qti_ice_setting_config(req, pdev,
						crypto_data, setting);
		}
		return 0;
	}

	if (req->part && req->part->info && req->part->info->volname[0]) {
		if (!strcmp(req->part->info->volname, "userdata")) {