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>
Цей коміт міститься в:
Sivakanth vaka
2020-07-10 14:30:44 +05:30
джерело 9b22e915ef
коміт 00100fbf02
2 змінених файлів з 11 додано та 2 видалено

Переглянути файл

@@ -628,7 +628,8 @@ static netdev_tx_t ecm_ipa_start_xmit
fail_tx_packet: fail_tx_packet:
out: 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: fail_pm_activate:
return status; return status;
} }
@@ -1180,6 +1181,8 @@ static void ecm_ipa_tx_complete_notify
netif_wake_queue(ecm_ipa_ctx->net); 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: out:
dev_kfree_skb_any(skb); dev_kfree_skb_any(skb);
} }

Переглянути файл

@@ -982,8 +982,10 @@ static netdev_tx_t rndis_ipa_start_xmit(struct sk_buff *skb,
fail_tx_packet: fail_tx_packet:
rndis_ipa_xmit_error(skb); rndis_ipa_xmit_error(skb);
out: 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: fail_pm_activate:
RNDIS_IPA_DEBUG RNDIS_IPA_DEBUG
("packet Tx done - %s\n", ("packet Tx done - %s\n",
(status == NETDEV_TX_OK) ? "OK" : "FAIL"); (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"); 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: out:
dev_kfree_skb_any(skb); dev_kfree_skb_any(skb);
} }