From e6716d048b9615a3bbe6a5eb15889d181b4e50ac Mon Sep 17 00:00:00 2001 From: Vivek Pernamitta Date: Wed, 28 Apr 2021 20:36:00 +0530 Subject: [PATCH] mhi: msm: Abort RDDM dump collection in PBL state Abort RDDM dump collection through __mhi_download_rddm_in_panic() when device is in PBL state. Change-Id: Ic2b5b9be79523881fca5c37dd1a3e1264bfa3829 Signed-off-by: Vivek Pernamitta --- drivers/bus/mhi/core/mhi_boot.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/bus/mhi/core/mhi_boot.c b/drivers/bus/mhi/core/mhi_boot.c index c86270e55897..760502a96f58 100644 --- a/drivers/bus/mhi/core/mhi_boot.c +++ b/drivers/bus/mhi/core/mhi_boot.c @@ -221,6 +221,12 @@ static int __mhi_download_rddm_in_panic(struct mhi_controller *mhi_cntrl) TO_MHI_STATE_STR(mhi_cntrl->dev_state), TO_MHI_EXEC_STR(mhi_cntrl->ee)); + if (mhi_cntrl->ee == MHI_EE_PBL) { + MHI_CNTRL_LOG("Aborting RDDM dumps as device is in %s state\n", + TO_MHI_EXEC_STR(mhi_cntrl->ee)); + return -EACCES; + } + /* * This should only be executing during a kernel panic, we expect all * other cores to shutdown while we're collecting rddm buffer. After