public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Hemant Kumar <hemantk@codeaurora.org>
To: Bhaumik Bhatt <bbhatt@codeaurora.org>, manivannan.sadhasivam@linaro.org
Cc: linux-arm-msm@vger.kernel.org, jhugo@codeaurora.org,
	linux-kernel@vger.kernel.org, loic.poulain@linaro.org
Subject: Re: [PATCH] bus: mhi: core: Improve debug messages for power on
Date: Fri, 30 Apr 2021 17:30:37 -0700	[thread overview]
Message-ID: <c26a8005-3bd6-eab0-185d-6341419dd59c@codeaurora.org> (raw)
In-Reply-To: <1619485258-35689-1-git-send-email-bbhatt@codeaurora.org>


Hi Bhaumik,

On 4/26/21 6:00 PM, Bhaumik Bhatt wrote:
> Improve error message to be more descriptive if a failure occurs
> with an invalid power on execution environment. Also add a debug
> message to print the execution environment and MHI state before
> a power on is attempted to get a better view of device states.
Can we add a scenario where this dbg log can help ? That gives a good 
justification for addition of new log.
> 
> Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
> ---
>   drivers/bus/mhi/core/pm.c | 6 +++++-
>   1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/bus/mhi/core/pm.c b/drivers/bus/mhi/core/pm.c
> index adf426c..f4a8b9a 100644
> --- a/drivers/bus/mhi/core/pm.c
> +++ b/drivers/bus/mhi/core/pm.c
> @@ -1076,12 +1076,16 @@ int mhi_async_power_up(struct mhi_controller *mhi_cntrl)
>   
>   	/* Confirm that the device is in valid exec env */
>   	if (!MHI_IN_PBL(current_ee) && current_ee != MHI_EE_AMSS) {
> -		dev_err(dev, "Not a valid EE for power on\n");
> +		dev_err(dev, "%s is not a valid EE for power on\n",
> +			TO_MHI_EXEC_STR(current_ee));
>   		ret = -EIO;
>   		goto error_async_power_up;
>   	}
>   
>   	state = mhi_get_mhi_state(mhi_cntrl);
> +	dev_dbg(dev, "Attempting power on with EE: %s, state: %s\n",
> +		TO_MHI_EXEC_STR(current_ee), TO_MHI_STATE_STR(state));
> +
>   	if (state == MHI_STATE_SYS_ERR) {
>   		mhi_set_mhi_state(mhi_cntrl, MHI_STATE_RESET);
>   		ret = wait_event_timeout(mhi_cntrl->state_event,
> 

Thanks,
Hemant
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

      reply	other threads:[~2021-05-01  0:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-27  1:00 [PATCH] bus: mhi: core: Improve debug messages for power on Bhaumik Bhatt
2021-05-01  0:30 ` Hemant Kumar [this message]

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=c26a8005-3bd6-eab0-185d-6341419dd59c@codeaurora.org \
    --to=hemantk@codeaurora.org \
    --cc=bbhatt@codeaurora.org \
    --cc=jhugo@codeaurora.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=loic.poulain@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox