diff options
author | Puja Gupta <pujag@codeaurora.org> | 2017-02-24 17:19:38 -0800 |
---|---|---|
committer | Puja Gupta <pujag@codeaurora.org> | 2017-02-27 12:33:18 -0800 |
commit | bf57c353c0c75781a44831670ab3ecf575ef8f99 (patch) | |
tree | ec26ea2e0575ec82392def117fa7471e902dd8f9 /drivers/soc | |
parent | 98094e2149dad0658346d504edde8aac9a921500 (diff) |
soc: qcom: Propagate separate error code for PDR disabled
In case of user PD restart requests from clients, return a separate error
code if PDR is disabled on subsystem. This is so that clients can
distinguish it from other error cases and take appropriate action.
CRs-Fixed: 2011758
Change-Id: Ifac7779455a3984de97a4e3e2f33bd74c5148cab
Signed-off-by: Puja Gupta <pujag@codeaurora.org>
Diffstat (limited to 'drivers/soc')
-rw-r--r-- | drivers/soc/qcom/service-notifier.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/soc/qcom/service-notifier.c b/drivers/soc/qcom/service-notifier.c index 85ff81ff475c..c1c65cd25558 100644 --- a/drivers/soc/qcom/service-notifier.c +++ b/drivers/soc/qcom/service-notifier.c @@ -635,7 +635,13 @@ static int send_pd_restart_req(const char *service_path, return rc; } - /* Check the response */ + /* Check response if PDR is disabled */ + if (QMI_RESP_BIT_SHIFT(resp.resp.result) == QMI_ERR_DISABLED_V01) { + pr_err("PD restart is disabled 0x%x\n", + QMI_RESP_BIT_SHIFT(resp.resp.error)); + return -EOPNOTSUPP; + } + /* Check the response for other error case*/ if (QMI_RESP_BIT_SHIFT(resp.resp.result) != QMI_RESULT_SUCCESS_V01) { pr_err("QMI request for PD restart failed 0x%x\n", QMI_RESP_BIT_SHIFT(resp.resp.error)); |