Loading drivers/platform/msm/mhi_dev/mhi_sm.c +21 −5 Original line number Diff line number Diff line Loading @@ -23,6 +23,9 @@ #define MHI_SM_FUNC_EXIT() MHI_SM_DBG("EXIT\n") #define PCIE_EP_TIMER_US 500000000 #define MHI_IPA_DISABLE_DELAY_MS 10 #define MHI_IPA_DISABLE_COUNTER 20 static inline const char *mhi_sm_dev_event_str(enum mhi_dev_event state) { Loading Loading @@ -591,7 +594,7 @@ static int mhi_sm_prepare_suspend(enum mhi_dev_state new_state) { enum mhi_dev_state old_state; struct ep_pcie_inactivity inact_param; int res = 0, rc; int res = 0, rc, wait_timeout = 0; MHI_SM_DBG("Switching event:%d\n", new_state); Loading Loading @@ -668,11 +671,24 @@ static int mhi_sm_prepare_suspend(enum mhi_dev_state new_state) (new_state == MHI_DEV_M3_STATE))) { if (mhi_sm_ctx->mhi_dev->use_ipa) { MHI_SM_DBG("Disable IPA with ipa_dma_disable()\n"); while (wait_timeout < MHI_IPA_DISABLE_COUNTER) { /* wait for the disable to finish */ res = ipa_dma_disable(); if (res) { MHI_SM_ERR("IPA disable failed\n"); if (!res) break; MHI_SM_ERR ("IPA disable fail cnt:%d\n", wait_timeout); msleep(MHI_IPA_DISABLE_DELAY_MS); wait_timeout++; } if (wait_timeout >= MHI_IPA_DISABLE_COUNTER) { MHI_SM_ERR ("Fail to disable IPA for M3\n"); goto exit; } MHI_SM_ERR("IPA DMA successfully disabled\n"); } } Loading Loading
drivers/platform/msm/mhi_dev/mhi_sm.c +21 −5 Original line number Diff line number Diff line Loading @@ -23,6 +23,9 @@ #define MHI_SM_FUNC_EXIT() MHI_SM_DBG("EXIT\n") #define PCIE_EP_TIMER_US 500000000 #define MHI_IPA_DISABLE_DELAY_MS 10 #define MHI_IPA_DISABLE_COUNTER 20 static inline const char *mhi_sm_dev_event_str(enum mhi_dev_event state) { Loading Loading @@ -591,7 +594,7 @@ static int mhi_sm_prepare_suspend(enum mhi_dev_state new_state) { enum mhi_dev_state old_state; struct ep_pcie_inactivity inact_param; int res = 0, rc; int res = 0, rc, wait_timeout = 0; MHI_SM_DBG("Switching event:%d\n", new_state); Loading Loading @@ -668,11 +671,24 @@ static int mhi_sm_prepare_suspend(enum mhi_dev_state new_state) (new_state == MHI_DEV_M3_STATE))) { if (mhi_sm_ctx->mhi_dev->use_ipa) { MHI_SM_DBG("Disable IPA with ipa_dma_disable()\n"); while (wait_timeout < MHI_IPA_DISABLE_COUNTER) { /* wait for the disable to finish */ res = ipa_dma_disable(); if (res) { MHI_SM_ERR("IPA disable failed\n"); if (!res) break; MHI_SM_ERR ("IPA disable fail cnt:%d\n", wait_timeout); msleep(MHI_IPA_DISABLE_DELAY_MS); wait_timeout++; } if (wait_timeout >= MHI_IPA_DISABLE_COUNTER) { MHI_SM_ERR ("Fail to disable IPA for M3\n"); goto exit; } MHI_SM_ERR("IPA DMA successfully disabled\n"); } } Loading