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

Commit 2610ea0c authored by Gidon Studinski's avatar Gidon Studinski
Browse files

msm: rndis_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: I63f9351391a626c735dd19a4456dd963360f097c
Signed-off-by: default avatarGidon Studinski <gidons@codeaurora.org>
parent bc89b16c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -986,8 +986,8 @@ static void rndis_ipa_rm_notify(void *user_data, enum ipa_rm_event event,
	RNDIS_IPA_DEBUG("Resource Granted\n");

	if (netif_queue_stopped(rndis_ipa_ctx->net)) {
		RNDIS_IPA_DEBUG("waking queue\n");
		netif_wake_queue(rndis_ipa_ctx->net);
		RNDIS_IPA_DEBUG("starting queue\n");
		netif_start_queue(rndis_ipa_ctx->net);
	} else {
		RNDIS_IPA_DEBUG("queue already awake\n");
	}