From: Loic Poulain <loic.poulain@linaro.org>
To: Jeffrey Hugo <jhugo@codeaurora.org>
Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>,
Hemant Kumar <hemantk@codeaurora.org>,
Bhaumik Bhatt <bbhatt@codeaurora.org>,
linux-arm-msm <linux-arm-msm@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] bus: mhi: core: Fix check for syserr at power_up
Date: Mon, 15 Feb 2021 08:25:09 +0100 [thread overview]
Message-ID: <CAMZdPi94fSRLua8yacvSdNUj9SRJov7Ga3p7Rtqc2VqNhwPYcw@mail.gmail.com> (raw)
In-Reply-To: <1613165243-23359-1-git-send-email-jhugo@codeaurora.org>
On Fri, 12 Feb 2021 at 22:27, Jeffrey Hugo <jhugo@codeaurora.org> 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>
Reviewed-by: Loic Poulain <loic.poulain@linaro.org>
> ---
> 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-02-15 7:18 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 [this message]
2021-02-16 7:31 ` Manivannan Sadhasivam
2021-03-10 14:11 ` Manivannan Sadhasivam
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=CAMZdPi94fSRLua8yacvSdNUj9SRJov7Ga3p7Rtqc2VqNhwPYcw@mail.gmail.com \
--to=loic.poulain@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=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;
as well as URLs for NNTP newsgroup(s).