mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Anvith Dosapati <anvithdosapati@google.com>,
	Alim Akhtar <alim.akhtar@samsung.com>,
	Avri Altman <avri.altman@wdc.com>
Cc: Manivannan Sadhasivam <mani@kernel.org>,
	Subhash Jadavani <subhashj@codeaurora.org>,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
	manugautam@google.com, vamshigajjela@google.com,
	stable@vger.kernel.org
Subject: Re: [PATCH v2] scsi: ufs: core: Fix clk scaling to be conditional in reset and restore
Date: Wed, 18 Jun 2025 08:41:18 -0700	[thread overview]
Message-ID: <6e088a4a-2665-472a-ac44-a645d17b2e99@acm.org> (raw)
In-Reply-To: <20250616085734.2133581-1-anvithdosapati@google.com>

On 6/16/25 1:57 AM, Anvith Dosapati wrote:
> From: anvithdosapati <anvithdosapati@google.com>
> 
> In ufshcd_host_reset_and_restore, scale up clocks only when clock
> scaling is supported. Without this change cpu latency is voted for 0
> (ufshcd_pm_qos_update) during resume unconditionally.
> 
> Signed-off-by: anvithdosapati <anvithdosapati@google.com>
> Fixes: a3cd5ec55f6c7 ("scsi: ufs: add load based scaling of UFS gear")
> Cc: stable@vger.kernel.org
> ---
> v2:
> - Update commit message
> - Add Fixes and Cc stable
> 
>   drivers/ufs/core/ufshcd.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
> index 4410e7d93b7d..fac381ea2b3a 100644
> --- a/drivers/ufs/core/ufshcd.c
> +++ b/drivers/ufs/core/ufshcd.c
> @@ -7802,7 +7802,8 @@ static int ufshcd_host_reset_and_restore(struct ufs_hba *hba)
>   	hba->silence_err_logs = false;
>   
>   	/* scale up clocks to max frequency before full reinitialization */
> -	ufshcd_scale_clks(hba, ULONG_MAX, true);
> +	if (ufshcd_is_clkscaling_supported(hba))
> +		ufshcd_scale_clks(hba, ULONG_MAX, true);
>   
>   	err = ufshcd_hba_enable(hba);
>   

Reviewed-by: Bart Van Assche <bvanassche@acm.org>

      reply	other threads:[~2025-06-18 15:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-16  8:57 Anvith Dosapati
2025-06-18 15:41 ` Bart Van Assche [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=6e088a4a-2665-472a-ac44-a645d17b2e99@acm.org \
    --to=bvanassche@acm.org \
    --cc=alim.akhtar@samsung.com \
    --cc=anvithdosapati@google.com \
    --cc=avri.altman@wdc.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mani@kernel.org \
    --cc=manugautam@google.com \
    --cc=stable@vger.kernel.org \
    --cc=subhashj@codeaurora.org \
    --cc=vamshigajjela@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®