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

Commit 67fabb63 authored by Skylar Chang's avatar Skylar Chang Committed by Ashok Vuyyuru
Browse files

msm: ipa3: add check to load gsi fw once



Add the check before starting workqueue
to load ipa/gsi-fws to avoid the smmu
assert.

Change-Id: Icdea2df4ea30bc154bf539c3016fb08defce4c55
Signed-off-by: default avatarSkylar Chang <chiaweic@codeaurora.org>
Signed-off-by: default avatarAshok Vuyyuru <avuyyuru@codeaurora.org>
parent 1dca5a04
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2019, 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
@@ -4484,6 +4484,15 @@ static ssize_t ipa3_write(struct file *file, const char __user *buf,
	if (ipa3_ctx->transport_prototype != IPA_TRANSPORT_TYPE_GSI)
		return count;

	/* Prevent multiple calls from trying to load the FW again. */
	if (ipa3_ctx->fw_loaded) {
		IPAERR("not load FW again\n");
		return count;
	}

	/* Schedule WQ to load ipa-fws */
	ipa3_ctx->fw_loaded = true;

	IPA_ACTIVE_CLIENTS_INC_SIMPLE();

	if (ipa3_is_msm_device() || (ipa3_ctx->ipa_hw_type >= IPA_HW_v3_5))
+2 −1
Original line number Diff line number Diff line
/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2019, 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
@@ -1296,6 +1296,7 @@ struct ipa3_context {
	struct ipa_cne_evt ipa_cne_evt_req_cache[IPA_MAX_NUM_REQ_CACHE];
	int num_ipa_cne_evt_req;
	struct mutex ipa_cne_evt_lock;
	bool fw_loaded;
};

/**