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

Commit 30ef773f authored by Skylar Chang's avatar Skylar Chang
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
crash.

Change-Id: Icdea2df4ea30bc154bf539c3016fb08defce4c55
Signed-off-by: default avatarSkylar Chang <chiaweic@codeaurora.org>
parent 4fd6ee6c
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -5233,6 +5233,15 @@ static ssize_t ipa3_write(struct file *file, const char __user *buf,
			ipa3_ctx->ipa_config_is_mhi ? "" : "non ");
	}

	/* 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;

	queue_work(ipa3_ctx->transport_power_mgmt_wq,
		&ipa3_fw_loading_work);

+1 −0
Original line number Diff line number Diff line
@@ -1723,6 +1723,7 @@ struct ipa3_context {
	int (*client_lock_unlock[IPA_MAX_CLNT])(bool is_lock);
	atomic_t is_ssr;
	bool (*get_teth_port_state[IPA_MAX_CLNT])(void);
	bool fw_loaded;
};

struct ipa3_plat_drv_res {