qcacmn: Increment htc runtime cnt prior to hif_send_head
HTC runtime count is incremented after posting the HTT ver req message to CE4. There could be possibility of processing the ver response message from FW even before htc_runtime_cnt is incremented. This can casue RTPM put to not happen causing imbalance in get/put count. Fix is to increment htc_runtime_cnt before enqueuing the HTT message to CE. Change-Id: Ib9b69910cd14193c41ecfee804b390f8a6cdef49 CRs-Fixed: 2794451
This commit is contained in:

zatwierdzone przez
snandini

rodzic
5da344f9b7
commit
b2fa2a1dbd
@@ -4571,6 +4571,8 @@ static void dp_htt_t2h_msg_handler(void *context, HTC_PACKET *pkt)
|
||||
*/
|
||||
if (htc_dec_return_runtime_cnt(soc->htc_soc) >= 0)
|
||||
htc_pm_runtime_put(soc->htc_soc);
|
||||
else
|
||||
soc->stats.htt_ver_req_put_skip++;
|
||||
soc->tgt_ver.major = HTT_VER_CONF_MAJOR_GET(*msg_word);
|
||||
soc->tgt_ver.minor = HTT_VER_CONF_MINOR_GET(*msg_word);
|
||||
QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_INFO_LOW,
|
||||
|
@@ -194,6 +194,8 @@ struct htt_soc {
|
||||
struct {
|
||||
int htc_err_cnt;
|
||||
int htc_pkt_free;
|
||||
/* rtpm put skip count for ver req msg */
|
||||
int htt_ver_req_put_skip;
|
||||
} stats;
|
||||
|
||||
HTT_TX_MUTEX_TYPE htt_tx_mutex;
|
||||
|
@@ -858,8 +858,10 @@ static QDF_STATUS htc_issue_packets(HTC_TARGET *target,
|
||||
if (pPacket->PktInfo.AsTx.Tag == HTC_TX_PACKET_TAG_RUNTIME_PUT)
|
||||
rt_put = true;
|
||||
else if (pPacket->PktInfo.AsTx.Tag ==
|
||||
HTC_TX_PACKET_TAG_RTPM_PUT_RC)
|
||||
HTC_TX_PACKET_TAG_RTPM_PUT_RC) {
|
||||
rt_put_in_resp = true;
|
||||
htc_inc_runtime_cnt(target);
|
||||
}
|
||||
|
||||
#if DEBUG_BUNDLE
|
||||
qdf_print(" Send single EP%d buffer size:0x%x, total:0x%x.",
|
||||
@@ -879,6 +881,8 @@ static QDF_STATUS htc_issue_packets(HTC_TARGET *target,
|
||||
netbuf, data_attr);
|
||||
|
||||
if (status != QDF_STATUS_SUCCESS) {
|
||||
if (rt_put_in_resp)
|
||||
htc_dec_return_runtime_cnt((void *)target);
|
||||
if (pEndpoint->EpCallBacks.ep_padding_credit_update) {
|
||||
if (used_extra_tx_credit) {
|
||||
ctx = pEndpoint->EpCallBacks.pContext;
|
||||
@@ -946,9 +950,6 @@ static QDF_STATUS htc_issue_packets(HTC_TARGET *target,
|
||||
RTPM_ID_HTC);
|
||||
rt_put = false;
|
||||
}
|
||||
|
||||
if (rt_put_in_resp)
|
||||
htc_inc_runtime_cnt(target);
|
||||
}
|
||||
|
||||
if (qdf_unlikely(QDF_IS_STATUS_ERROR(status))) {
|
||||
|
Reference in New Issue
Block a user