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

Commit 03ba1d00 authored by Gidon Studinski's avatar Gidon Studinski
Browse files

msm: ipa3: ssr: stop QMI service in BEFORE_POWERUP stage



Cleanup QMI service in BEFORE_POWERUP SSR stage. This comes to prevent a
state where a QMI message is received or sent after the QMI handle has
already been freed.

Change-Id: I6cd5af342a2cb754240a435154c2b1be382a98ba
Signed-off-by: default avatarGidon Studinski <gidons@codeaurora.org>
parent 1c2c6d7f
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
/* Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
/* Copyright (c) 2014-2016, 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
@@ -2111,8 +2111,6 @@ static int ipa3_wwan_remove(struct platform_device *pdev)
	ipa3_del_mux_qmap_hdrs();
	if (ipa3_qmi_ctx->modem_cfg_emb_pipe_flt == false)
		ipa3_wwan_del_ul_flt_rule_to_ipa();
	/* clean up cached QMI msg/handlers */
	ipa3_qmi_service_exit();
	ipa3_cleanup_deregister_intf();
	atomic_set(&is_initialized, 0);
	pr_info("rmnet_ipa completed deinitialization\n");
@@ -2240,6 +2238,9 @@ static int ipa3_ssr_notifier_cb(struct notifier_block *this,
		}
		if (SUBSYS_BEFORE_POWERUP == code) {
			pr_info("IPA received MPSS BEFORE_POWERUP\n");
			if (atomic_read(&is_ssr))
				/* clean up cached QMI msg/handlers */
				ipa3_qmi_service_exit();
			ipa3_proxy_clk_vote();
			pr_info("IPA BEFORE_POWERUP handling is complete\n");
			return NOTIFY_DONE;