From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
To: Jeffrey Hugo <jhugo@codeaurora.org>
Cc: hemantk@codeaurora.org, bbhatt@codeaurora.org,
loic.poulain@linaro.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] bus: mhi: core: Fix check for syserr at power_up
Date: Wed, 10 Mar 2021 19:41:16 +0530 [thread overview]
Message-ID: <20210310141116.GS30275@thinkpad> (raw)
In-Reply-To: <1613165243-23359-1-git-send-email-jhugo@codeaurora.org>
On Fri, Feb 12, 2021 at 02:27:23PM -0700, Jeffrey Hugo wrote:
> The check to see if we have reset the device after detecting syserr at
> power_up is inverted. wait_for_event_timeout() returns 0 on failure,
> and a positive value on success. The check is looking for non-zero
> as a failure, which is likely to incorrectly cause a device init failure
> if syserr was detected at power_up. Fix this.
>
> Fixes: e18d4e9fa79b ("bus: mhi: core: Handle syserr during power_up")
> Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
Applied to mhi-next!
Thanks,
Mani
> ---
> drivers/bus/mhi/core/pm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/bus/mhi/core/pm.c b/drivers/bus/mhi/core/pm.c
> index 681960c..36ab7aa 100644
> --- a/drivers/bus/mhi/core/pm.c
> +++ b/drivers/bus/mhi/core/pm.c
> @@ -1092,7 +1092,7 @@ int mhi_async_power_up(struct mhi_controller *mhi_cntrl)
> &val) ||
> !val,
> msecs_to_jiffies(mhi_cntrl->timeout_ms));
> - if (ret) {
> + if (!ret) {
> ret = -EIO;
> dev_info(dev, "Failed to reset MHI due to syserr state\n");
> goto error_bhi_offset;
> --
> Qualcomm Technologies, Inc. is a member of the
> Code Aurora Forum, a Linux Foundation Collaborative Project.
>
next prev parent reply other threads:[~2021-03-10 14:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-12 21:27 [PATCH] bus: mhi: core: Fix check for syserr at power_up Jeffrey Hugo
2021-02-15 7:25 ` Loic Poulain
2021-02-16 7:31 ` Manivannan Sadhasivam
2021-03-10 14:11 ` Manivannan Sadhasivam [this message]
2021-05-26 19:03 ` patchwork-bot+linux-arm-msm
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=20210310141116.GS30275@thinkpad \
--to=manivannan.sadhasivam@linaro.org \
--cc=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=loic.poulain@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.