summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPixelBot AutoMerger <android-nexus-securitybot@system.gserviceaccount.com>2023-03-26 19:16:48 -0700
committerSecurityBot <android-nexus-securitybot@system.gserviceaccount.com>2023-03-26 19:16:48 -0700
commitadcf51862ac43461e22d23f0d5454514c0b6d013 (patch)
tree83d18df1249868121ace6af193b1f941f71aa9d9
parent4e596fddc192809de7cf19b48e3e1dd2ca3d7aa1 (diff)
parentc2a3190fca116ef1a37e16652966723a46e06694 (diff)
downloadcnss2-adcf51862ac43461e22d23f0d5454514c0b6d013.tar.gz
Merge android13-gs-pixel-5.10-tm-qpr3 into android13-gs-pixel-5.10-udc
SBMerger: 516612970 Change-Id: I1457dc72e031f87164e516397b72879d33492c6e Signed-off-by: SecurityBot <android-nexus-securitybot@system.gserviceaccount.com>
-rw-r--r--mhi/core/pm.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/mhi/core/pm.c b/mhi/core/pm.c
index 02b340f..fd34e6c 100644
--- a/mhi/core/pm.c
+++ b/mhi/core/pm.c
@@ -806,17 +806,23 @@ void mhi_pm_st_worker(struct work_struct *work)
static bool mhi_in_rddm(struct mhi_controller *mhi_cntrl)
{
struct device *dev = &mhi_cntrl->mhi_dev->dev;
+ enum mhi_ee_type ee = MHI_EE_MAX;
- if (mhi_cntrl->rddm_image && mhi_get_exec_env(mhi_cntrl) == MHI_EE_RDDM
+ ee = mhi_get_exec_env(mhi_cntrl);
+
+ if (mhi_cntrl->rddm_image && ee == MHI_EE_RDDM
&& mhi_is_active(mhi_cntrl)) {
- mhi_cntrl->ee = MHI_EE_RDDM;
MHI_ERR("RDDM event occurred!\n");
/* notify critical clients with early notifications */
mhi_report_error(mhi_cntrl);
- mhi_cntrl->status_cb(mhi_cntrl, MHI_CB_EE_RDDM);
+ /* Notify mhi controller only once for RDDM event*/
+ if (ee == MHI_EE_RDDM && mhi_cntrl->ee != MHI_EE_RDDM) {
+ mhi_cntrl->status_cb(mhi_cntrl, MHI_CB_EE_RDDM);
+ mhi_cntrl->ee = MHI_EE_RDDM;
+ }
wake_up_all(&mhi_cntrl->state_event);
return true;