mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 08:36:12 -04:00
MDM:IPA3: Fixes issue with RNDIS and ECM suspend path
PM resources are released even when there are outstanding packets leading to data stall hence resources are released only when there are no outstanding packets. Change-Id: I630737edfc9cadea1d8a99bdb6bb6fcbe76615d8 Signed-off-by: sivakanth vaka <svaka@codeaurora.org>
This commit is contained in:
parent
9b22e915ef
commit
00100fbf02
2 changed files with 11 additions and 2 deletions
|
|
@ -628,7 +628,8 @@ static netdev_tx_t ecm_ipa_start_xmit
|
|||
|
||||
fail_tx_packet:
|
||||
out:
|
||||
ipa_pm_deferred_deactivate(ecm_ipa_ctx->pm_hdl);
|
||||
if (atomic_read(&ecm_ipa_ctx->outstanding_pkts) == 0)
|
||||
ipa_pm_deferred_deactivate(ecm_ipa_ctx->pm_hdl);
|
||||
fail_pm_activate:
|
||||
return status;
|
||||
}
|
||||
|
|
@ -1180,6 +1181,8 @@ static void ecm_ipa_tx_complete_notify
|
|||
netif_wake_queue(ecm_ipa_ctx->net);
|
||||
}
|
||||
|
||||
if (atomic_read(&ecm_ipa_ctx->outstanding_pkts) == 0)
|
||||
ipa_pm_deferred_deactivate(ecm_ipa_ctx->pm_hdl);
|
||||
out:
|
||||
dev_kfree_skb_any(skb);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -982,8 +982,10 @@ static netdev_tx_t rndis_ipa_start_xmit(struct sk_buff *skb,
|
|||
fail_tx_packet:
|
||||
rndis_ipa_xmit_error(skb);
|
||||
out:
|
||||
ipa_pm_deferred_deactivate(rndis_ipa_ctx->pm_hdl);
|
||||
if (atomic_read(&rndis_ipa_ctx->outstanding_pkts) == 0)
|
||||
ipa_pm_deferred_deactivate(rndis_ipa_ctx->pm_hdl);
|
||||
fail_pm_activate:
|
||||
|
||||
RNDIS_IPA_DEBUG
|
||||
("packet Tx done - %s\n",
|
||||
(status == NETDEV_TX_OK) ? "OK" : "FAIL");
|
||||
|
|
@ -1055,6 +1057,10 @@ static void rndis_ipa_tx_complete_notify(
|
|||
RNDIS_IPA_DEBUG("send queue was awaken\n");
|
||||
}
|
||||
|
||||
/*Release resource only when outstanding packets are zero*/
|
||||
if (atomic_read(&rndis_ipa_ctx->outstanding_pkts) == 0)
|
||||
ipa_pm_deferred_deactivate(rndis_ipa_ctx->pm_hdl);
|
||||
|
||||
out:
|
||||
dev_kfree_skb_any(skb);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue