diff options
| author | Amir Levy <alevy@codeaurora.org> | 2017-06-25 10:06:14 +0300 |
|---|---|---|
| committer | Amir Levy <alevy@codeaurora.org> | 2017-06-25 10:06:14 +0300 |
| commit | 9d56022bb622889e298ac3a0272bfa3b3010f7d5 (patch) | |
| tree | be9802c05799c30ddaf63a9cc2c5cf0ef5f2a548 | |
| parent | 6f56b2a9c8e2ce69e2a98e52d5f1342b25cae44e (diff) | |
msm: ipa3: remove delay from AP if QMI fails
In case of failure to send QMI message to modem
remove the delay from AP since modem is probably
down (SSR\reboot).
Change-Id: Iae4d5162d39cd05f5c50d75087ec90dfe04a6c43
Signed-off-by: Amir Levy <alevy@codeaurora.org>
| -rw-r--r-- | drivers/platform/msm/ipa/ipa_v3/ipa_client.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/drivers/platform/msm/ipa/ipa_v3/ipa_client.c b/drivers/platform/msm/ipa/ipa_v3/ipa_client.c index e349ade46075..bc6622d4725b 100644 --- a/drivers/platform/msm/ipa/ipa_v3/ipa_client.c +++ b/drivers/platform/msm/ipa/ipa_v3/ipa_client.c @@ -1668,8 +1668,21 @@ static int ipa3_stop_ul_chan_with_data_drain(u32 qmi_req_id, if (should_force_clear) { result = ipa3_enable_force_clear(qmi_req_id, false, source_pipe_bitmask); - if (result) - goto exit; + if (result) { + struct ipahal_ep_cfg_ctrl_scnd ep_ctrl_scnd = { 0 }; + + /* + * assuming here modem SSR\shutdown, AP can remove + * the delay in this case + */ + IPAERR( + "failed to force clear %d, remove delay from SCND reg\n" + , result); + ep_ctrl_scnd.endp_delay = false; + ipahal_write_reg_n_fields( + IPA_ENDP_INIT_CTRL_SCND_n, clnt_hdl, + &ep_ctrl_scnd); + } } /* with force clear, wait for emptiness */ for (i = 0; i < IPA_POLL_FOR_EMPTINESS_NUM; i++) { |
