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

Commit 97149140 authored by Gidon Studinski's avatar Gidon Studinski
Browse files

msm: ecm_ipa: prevent a deadlock in suspend/resume scenario



Due to changes in IPA_RM, a deadlock is encountered in a suspend/resume
scenario. Replacing netif_wake_queue() with netif_start_queue() in the RM
notification callback fixes the problem.

The problem with netif_wake_queue() is that it starts to transmit packets
immediately, using the current context, which belongs to IPA_RM. In the Tx
function, the network driver calls another IPA_RM API which causes a
deadlock. Using netif_start_queue() will only flag the netdev as able to
transmit. The network stack will start transmitting packets later, from
it's own context.

Change-Id: Ic3d2fb4a660c8842f722ef4cce9344b77f124902
Signed-off-by: default avatarGidon Studinski <gidons@codeaurora.org>
parent 2610ea0c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -940,8 +940,8 @@ static void ecm_ipa_rm_notify(void *user_data, enum ipa_rm_event event,
	ECM_IPA_LOG_ENTRY();
	if (event == IPA_RM_RESOURCE_GRANTED &&
			netif_queue_stopped(ecm_ipa_ctx->net)) {
		ECM_IPA_DEBUG("Resource Granted - waking queue\n");
		netif_wake_queue(ecm_ipa_ctx->net);
		ECM_IPA_DEBUG("Resource Granted - starting queue\n");
		netif_start_queue(ecm_ipa_ctx->net);
	} else {
		ECM_IPA_DEBUG("Resource released\n");
	}