From: Vinod Koul <vkoul@kernel.org>
To: Johan Hovold <johan+linaro@kernel.org>
Cc: Kishon Vijay Abraham I <kishon@ti.com>,
Andy Gross <agross@kernel.org>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org,
linux-kernel@vger.kernel.org, Evan Green <evgreen@chromium.org>
Subject: Re: [PATCH 2/2] phy: qcom-qmp: fix pipe-clock imbalance on power-on failure
Date: Mon, 2 May 2022 15:39:41 +0530 [thread overview]
Message-ID: <Ym+t5YVL8HdJaBl4@matsya> (raw)
In-Reply-To: <20220420152331.5527-3-johan+linaro@kernel.org>
On 20-04-22, 17:23, Johan Hovold wrote:
> Make sure to disable the pipe clock also if ufs-reset deassertion fails
> during power on.
>
> Note that the ufs-reset is asserted in qcom_qmp_phy_com_exit().
>
> Fixes: c9b589791fc1 ("phy: qcom: Utilize UFS reset controller")
> Cc: Evan Green <evgreen@chromium.org>
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
> drivers/phy/qualcomm/phy-qcom-qmp.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/phy/qualcomm/phy-qcom-qmp.c b/drivers/phy/qualcomm/phy-qcom-qmp.c
> index 8c2300bfe489..7d2d1ab061f7 100644
> --- a/drivers/phy/qualcomm/phy-qcom-qmp.c
> +++ b/drivers/phy/qualcomm/phy-qcom-qmp.c
> @@ -5375,14 +5375,14 @@ static int qcom_qmp_phy_power_on(struct phy *phy)
> if (ret) {
> dev_err(qmp->dev, "lane%d reset deassert failed\n",
> qphy->index);
> - goto err_lane_rst;
> + return ret;
This can be skipped if we retain the err_lane_rst label
> }
> }
>
> ret = clk_prepare_enable(qphy->pipe_clk);
> if (ret) {
> dev_err(qmp->dev, "pipe_clk enable failed err=%d\n", ret);
> - goto err_clk_enable;
> + goto err_reset_lane;
> }
>
> /* Tx, Rx, and PCS configurations */
> @@ -5433,7 +5433,7 @@ static int qcom_qmp_phy_power_on(struct phy *phy)
>
> ret = reset_control_deassert(qmp->ufs_reset);
> if (ret)
> - goto err_lane_rst;
> + goto err_disable_pipe_clk;
this is the actual fix...
>
> qcom_qmp_phy_configure(pcs_misc, cfg->regs, cfg->pcs_misc_tbl,
> cfg->pcs_misc_tbl_num);
> @@ -5472,17 +5472,17 @@ static int qcom_qmp_phy_power_on(struct phy *phy)
> PHY_INIT_COMPLETE_TIMEOUT);
> if (ret) {
> dev_err(qmp->dev, "phy initialization timed-out\n");
> - goto err_pcs_ready;
> + goto err_disable_pipe_clk;
same rename here
> }
> }
> return 0;
>
> -err_pcs_ready:
> +err_disable_pipe_clk:
> clk_disable_unprepare(qphy->pipe_clk);
> -err_clk_enable:
> +err_reset_lane:
> if (cfg->has_lane_rst)
> reset_control_assert(qphy->lane_rst);
> -err_lane_rst:
> +
> return ret;
while I feel the names given by this patch are better, they should not
be in a fix patch. We should just add the one line fix here and do
renames later
> }
>
> --
> 2.35.1
--
~Vinod
next prev parent reply other threads:[~2022-05-02 10:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-20 15:23 [PATCH 0/2] phy: qcom-qmp: pipe clock fixes Johan Hovold
2022-04-20 15:23 ` [PATCH 1/2] phy: qcom-qmp: fix phy-descriptor kernel-doc typo Johan Hovold
2022-05-02 10:10 ` Vinod Koul
2022-04-20 15:23 ` [PATCH 2/2] phy: qcom-qmp: fix pipe-clock imbalance on power-on failure Johan Hovold
2022-05-02 10:09 ` Vinod Koul [this message]
2022-05-02 10:27 ` Johan Hovold
2022-05-02 12:01 ` Vinod Koul
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=Ym+t5YVL8HdJaBl4@matsya \
--to=vkoul@kernel.org \
--cc=agross@kernel.org \
--cc=bjorn.andersson@linaro.org \
--cc=evgreen@chromium.org \
--cc=johan+linaro@kernel.org \
--cc=kishon@ti.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.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).