From: Bhaumik Bhatt <bbhatt@codeaurora.org>
To: manivannan.sadhasivam@linaro.org
Cc: linux-arm-msm@vger.kernel.org, hemantk@codeaurora.org,
jhugo@codeaurora.org, linux-kernel@vger.kernel.org,
Bhaumik Bhatt <bbhatt@codeaurora.org>
Subject: [PATCH v1 3/6] bus: mhi: core: Check for RDDM support before forcing a device crash
Date: Tue, 19 May 2020 17:30:28 -0700 [thread overview]
Message-ID: <1589934631-22752-4-git-send-email-bbhatt@codeaurora.org> (raw)
In-Reply-To: <1589934631-22752-1-git-send-email-bbhatt@codeaurora.org>
Check if the device supports RDDM from the mhi_force_rddm_mode() API
before allowing a client to force a device crash. This will ensure that
a client who is unaware does not misuse the API and expect the device to
go to ramdump collection mode after a crash is forced.
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
---
drivers/bus/mhi/core/pm.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/bus/mhi/core/pm.c b/drivers/bus/mhi/core/pm.c
index 1daed86..52c290c6 100644
--- a/drivers/bus/mhi/core/pm.c
+++ b/drivers/bus/mhi/core/pm.c
@@ -1114,6 +1114,10 @@ int mhi_force_rddm_mode(struct mhi_controller *mhi_cntrl)
struct device *dev = &mhi_cntrl->mhi_dev->dev;
int ret;
+ /* Check if device supports RDDM */
+ if (!mhi_cntrl->rddm_image)
+ return -EINVAL;
+
/* Check if device is already in RDDM */
if (mhi_cntrl->ee == MHI_EE_RDDM)
return 0;
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
next prev parent reply other threads:[~2020-05-20 0:31 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-20 0:30 [PATCH v1 0/6] Bug fixes and bootup and shutdown improvements Bhaumik Bhatt
2020-05-20 0:30 ` [PATCH v1 1/6] bus: mhi: core: Improve shutdown handling after link down detection Bhaumik Bhatt
2020-05-20 0:30 ` [PATCH v1 2/6] bus: mhi: core: Mark device inactive soon after host issues a shutdown Bhaumik Bhatt
2020-05-20 5:16 ` kbuild test robot
2020-05-20 5:16 ` kbuild test robot
2020-05-21 5:50 ` kbuild test robot
2020-05-21 5:50 ` kbuild test robot
2020-05-21 10:26 ` kbuild test robot
2020-05-21 10:26 ` kbuild test robot
2020-05-20 0:30 ` Bhaumik Bhatt [this message]
2020-05-20 0:30 ` [PATCH v1 4/6] bus: mhi: core: Use common name for BHI firmware load function Bhaumik Bhatt
2020-05-20 0:30 ` [PATCH v1 5/6] bus: mhi: core: Introduce support for manual AMSS loading Bhaumik Bhatt
2020-05-20 0:30 ` [PATCH v1 6/6] bus: mhi: core: Process execution environment changes serially Bhaumik Bhatt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1589934631-22752-4-git-send-email-bbhatt@codeaurora.org \
--to=bbhatt@codeaurora.org \
--cc=hemantk@codeaurora.org \
--cc=jhugo@codeaurora.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.