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

Commit 95dc1c75 authored by Skylar Chang's avatar Skylar Chang
Browse files

msm: ipa: switch to interrupt mode only when needed



Do not change sps config in case IPA driver is polling mode as this
indicates that sps driver already notified EOT event and sps config
should not change until ipa driver processes the packet.

Change-Id: I28a6980c7cab2a5e7cf75817287dd190efcad9be
CRs-Fixed: 954307
Acked-by: default avatarAdy Abraham <adya@qti.qualcomm.com>
Signed-off-by: default avatarSkylar Chang <chiaweic@codeaurora.org>
parent 6f19e644
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
/* Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-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
@@ -858,6 +858,16 @@ static void ipa_sps_irq_control(struct ipa_sys_context *sys, bool enable)
{
	int ret;

	/*
	 * Do not change sps config in case we are in polling mode as this
	 * indicates that sps driver already notified EOT event and sps config
	 * should not change until ipa driver processes the packet.
	 */
	if (atomic_read(&sys->curr_polling_state)) {
		IPADBG("in polling mode, do not change config\n");
		return;
	}

	if (enable) {
		ret = sps_get_config(sys->ep->ep_hdl, &sys->ep->connect);
		if (ret) {