From: Manivannan Sadhasivam <mani@kernel.org>
To: Nitin Rawat <quic_nitirawa@quicinc.com>
Cc: powen.kao@mediatek.com, bvanassche@acm.org,
alim.akhtar@samsung.com, adrian.hunter@intel.com,
jejb@linux.ibm.com, stanley.chu@mediatek.com,
asutoshd@codeaurora.org, quic_cang@quicinc.com,
martin.petersen@oracle.com, beanhuo@micron.com,
ebiggers@google.com, agross@kernel.org, Arthur.Simchaev@wdc.com,
konrad.dybcio@linaro.org, quic_ziqichen@quicinc.com,
quic_nguyenb@quicinc.com, quic_narepall@quicinc.com,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-msm@vger.kernel.org,
Manish Pandey <quic_mapa@quicinc.com>
Subject: Re: [PATCH V2 2/2] scsi: ufs: ufs-qcom: check host controller state
Date: Wed, 2 Aug 2023 09:40:19 +0530 [thread overview]
Message-ID: <20230802041019.GC2370@thinkpad> (raw)
In-Reply-To: <20230726134140.7180-3-quic_nitirawa@quicinc.com>
On Wed, Jul 26, 2023 at 07:11:40PM +0530, Nitin Rawat wrote:
> Commit <52a518019ca1> (Fix missing clk change notification) added UFS
> clock scaling notification to ufshcd_host_reset_and_restore. This
> invokes hibern8 enter and exit on qualcomm platform which fails because
> controller is in reset state.
>
> Fix this by checking the Host controller state before sending
> hibern8 command.
>
> __ufshcd_wl_resume()
> ufshcd_reset_and_restore()
> ufshcd_host_reset_and_restore()
> ufshcd_scale_clks()
> ufshcd_vops_clk_scale_notify()
> ufs_qcom_clk_scale_notify()
> ufshcd_uic_hibern8_enter()
>
> Fixes: 52a518019ca1 ("scsi: ufs: core: Fix missing clk change notification on host reset")
>
Nit: No need of a newline here.
> Co-developed-by: Manish Pandey <quic_mapa@quicinc.com>
> Signed-off-by: Manish Pandey <quic_mapa@quicinc.com>
> Signed-off-by: Nitin Rawat <quic_nitirawa@quicinc.com>
Acked-by: Manivannan Sadhasivam <mani@kernel.org>
- Mani
> ---
> drivers/ufs/host/ufs-qcom.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c
> index 8d6fd4c3324f..95412e98a598 100644
> --- a/drivers/ufs/host/ufs-qcom.c
> +++ b/drivers/ufs/host/ufs-qcom.c
> @@ -1254,6 +1254,10 @@ static int ufs_qcom_clk_scale_notify(struct ufs_hba *hba,
> struct ufs_pa_layer_attr *dev_req_params = &host->dev_req_params;
> int err = 0;
>
> + /* check the host controller state before sending hibern8 cmd */
> + if (!ufshcd_is_hba_active(hba))
> + return 0;
> +
> if (status == PRE_CHANGE) {
> err = ufshcd_uic_hibern8_enter(hba);
> if (err)
> --
> 2.17.1
>
--
மணிவண்ணன் சதாசிவம்
next prev parent reply other threads:[~2023-08-02 4:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-26 13:41 [PATCH V2 0/2] Fix hibern8 enter failure during host reset Nitin Rawat
2023-07-26 13:41 ` [PATCH V2 1/2] scsi: ufs: core: Export ufshcd_is_hba_active Nitin Rawat
2023-08-02 4:05 ` Manivannan Sadhasivam
2023-07-26 13:41 ` [PATCH V2 2/2] scsi: ufs: ufs-qcom: check host controller state Nitin Rawat
2023-08-02 4:10 ` Manivannan Sadhasivam [this message]
2023-08-08 1:06 ` [PATCH V2 0/2] Fix hibern8 enter failure during host reset Martin K. Petersen
2023-08-21 22:27 ` Martin K. Petersen
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=20230802041019.GC2370@thinkpad \
--to=mani@kernel.org \
--cc=Arthur.Simchaev@wdc.com \
--cc=adrian.hunter@intel.com \
--cc=agross@kernel.org \
--cc=alim.akhtar@samsung.com \
--cc=asutoshd@codeaurora.org \
--cc=beanhuo@micron.com \
--cc=bvanassche@acm.org \
--cc=ebiggers@google.com \
--cc=jejb@linux.ibm.com \
--cc=konrad.dybcio@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=powen.kao@mediatek.com \
--cc=quic_cang@quicinc.com \
--cc=quic_mapa@quicinc.com \
--cc=quic_narepall@quicinc.com \
--cc=quic_nguyenb@quicinc.com \
--cc=quic_nitirawa@quicinc.com \
--cc=quic_ziqichen@quicinc.com \
--cc=stanley.chu@mediatek.com \
/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.