* [PATCH v2] scsi: ufs: Give clk scaling min gear a value
@ 2021-01-28 2:49 Can Guo
2021-01-28 2:59 ` Stanley Chu
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Can Guo @ 2021-01-28 2:49 UTC (permalink / raw)
To: jaegeuk, asutoshd, nguyenb, hongwus, bjorn.andersson, linux-scsi,
kernel-team, cang
Cc: Alim Akhtar, Avri Altman, James E.J. Bottomley,
Martin K. Petersen, Stanley Chu, Bean Huo, open list
The initialization of clk_scaling.min_gear was removed by mistake. This
change adds it back, otherwise clock scaling down would fail.
Fixes: 4543d9d78227 ("scsi: ufs: Refactor ufshcd_init/exit_clk_scaling/gating()")
Signed-off-by: Can Guo <cang@codeaurora.org>
---
drivers/scsi/ufs/ufshcd.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 36bcbb3..8ef6796 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -1602,6 +1602,9 @@ static void ufshcd_init_clk_scaling(struct ufs_hba *hba)
if (!ufshcd_is_clkscaling_supported(hba))
return;
+ if (!hba->clk_scaling.min_gear)
+ hba->clk_scaling.min_gear = UFS_HS_G1;
+
INIT_WORK(&hba->clk_scaling.suspend_work,
ufshcd_clk_scaling_suspend_work);
INIT_WORK(&hba->clk_scaling.resume_work,
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2] scsi: ufs: Give clk scaling min gear a value
2021-01-28 2:49 [PATCH v2] scsi: ufs: Give clk scaling min gear a value Can Guo
@ 2021-01-28 2:59 ` Stanley Chu
2021-01-28 3:28 ` Bjorn Andersson
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Stanley Chu @ 2021-01-28 2:59 UTC (permalink / raw)
To: Can Guo
Cc: jaegeuk, asutoshd, nguyenb, hongwus, bjorn.andersson, linux-scsi,
kernel-team, Alim Akhtar, Avri Altman, James E.J. Bottomley,
Martin K. Petersen, Bean Huo, open list
On Wed, 2021-01-27 at 18:49 -0800, Can Guo wrote:
> The initialization of clk_scaling.min_gear was removed by mistake. This
> change adds it back, otherwise clock scaling down would fail.
>
> Fixes: 4543d9d78227 ("scsi: ufs: Refactor ufshcd_init/exit_clk_scaling/gating()")
>
> Signed-off-by: Can Guo <cang@codeaurora.org>
Reviewed-by: Stanley Chu <stanley.chu@mediatek.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] scsi: ufs: Give clk scaling min gear a value
2021-01-28 2:49 [PATCH v2] scsi: ufs: Give clk scaling min gear a value Can Guo
2021-01-28 2:59 ` Stanley Chu
@ 2021-01-28 3:28 ` Bjorn Andersson
2021-01-28 3:34 ` Can Guo
2021-01-28 10:28 ` Bean Huo
2021-01-29 18:44 ` Martin K. Petersen
3 siblings, 1 reply; 6+ messages in thread
From: Bjorn Andersson @ 2021-01-28 3:28 UTC (permalink / raw)
To: Can Guo
Cc: jaegeuk, asutoshd, nguyenb, hongwus, linux-scsi, kernel-team,
Alim Akhtar, Avri Altman, James E.J. Bottomley,
Martin K. Petersen, Stanley Chu, Bean Huo, open list
On Wed 27 Jan 20:49 CST 2021, Can Guo wrote:
> The initialization of clk_scaling.min_gear was removed by mistake. This
> change adds it back, otherwise clock scaling down would fail.
>
Thanks for the patch Can, it solves the problem I'm seeing!
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Tested-by: Bjorn Andersson <bjorn.andersson@linaro.org>
And perhaps a:
Reported-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Regards,
Bjorn
> Fixes: 4543d9d78227 ("scsi: ufs: Refactor ufshcd_init/exit_clk_scaling/gating()")
>
> Signed-off-by: Can Guo <cang@codeaurora.org>
> ---
> drivers/scsi/ufs/ufshcd.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index 36bcbb3..8ef6796 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -1602,6 +1602,9 @@ static void ufshcd_init_clk_scaling(struct ufs_hba *hba)
> if (!ufshcd_is_clkscaling_supported(hba))
> return;
>
> + if (!hba->clk_scaling.min_gear)
> + hba->clk_scaling.min_gear = UFS_HS_G1;
> +
> INIT_WORK(&hba->clk_scaling.suspend_work,
> ufshcd_clk_scaling_suspend_work);
> INIT_WORK(&hba->clk_scaling.resume_work,
> --
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] scsi: ufs: Give clk scaling min gear a value
2021-01-28 3:28 ` Bjorn Andersson
@ 2021-01-28 3:34 ` Can Guo
0 siblings, 0 replies; 6+ messages in thread
From: Can Guo @ 2021-01-28 3:34 UTC (permalink / raw)
To: Bjorn Andersson
Cc: jaegeuk, asutoshd, nguyenb, hongwus, linux-scsi, kernel-team,
Alim Akhtar, Avri Altman, James E.J. Bottomley,
Martin K. Petersen, Stanley Chu, Bean Huo, open list
On 2021-01-28 11:28, Bjorn Andersson wrote:
> On Wed 27 Jan 20:49 CST 2021, Can Guo wrote:
>
>> The initialization of clk_scaling.min_gear was removed by mistake.
>> This
>> change adds it back, otherwise clock scaling down would fail.
>>
>
> Thanks for the patch Can, it solves the problem I'm seeing!
>
> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> Tested-by: Bjorn Andersson <bjorn.andersson@linaro.org>
>
>
> And perhaps a:
>
> Reported-by: Bjorn Andersson <bjorn.andersson@linaro.org>
>
I missed the two lines due to I was not working on the latest
scsi code tip - I should have tested it based on commit 29b87e92a216
("scsi: ufs: Stop hardcoding the scale down gear"), my bad.
Anyways, thanks for the test!
Regards,
Can Guo.
> Regards,
> Bjorn
>
>> Fixes: 4543d9d78227 ("scsi: ufs: Refactor
>> ufshcd_init/exit_clk_scaling/gating()")
>>
>> Signed-off-by: Can Guo <cang@codeaurora.org>
>> ---
>> drivers/scsi/ufs/ufshcd.c | 3 +++
>> 1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
>> index 36bcbb3..8ef6796 100644
>> --- a/drivers/scsi/ufs/ufshcd.c
>> +++ b/drivers/scsi/ufs/ufshcd.c
>> @@ -1602,6 +1602,9 @@ static void ufshcd_init_clk_scaling(struct
>> ufs_hba *hba)
>> if (!ufshcd_is_clkscaling_supported(hba))
>> return;
>>
>> + if (!hba->clk_scaling.min_gear)
>> + hba->clk_scaling.min_gear = UFS_HS_G1;
>> +
>> INIT_WORK(&hba->clk_scaling.suspend_work,
>> ufshcd_clk_scaling_suspend_work);
>> INIT_WORK(&hba->clk_scaling.resume_work,
>> --
>> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a
>> Linux Foundation Collaborative Project.
>>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] scsi: ufs: Give clk scaling min gear a value
2021-01-28 2:49 [PATCH v2] scsi: ufs: Give clk scaling min gear a value Can Guo
2021-01-28 2:59 ` Stanley Chu
2021-01-28 3:28 ` Bjorn Andersson
@ 2021-01-28 10:28 ` Bean Huo
2021-01-29 18:44 ` Martin K. Petersen
3 siblings, 0 replies; 6+ messages in thread
From: Bean Huo @ 2021-01-28 10:28 UTC (permalink / raw)
To: Can Guo, jaegeuk, asutoshd, nguyenb, hongwus, bjorn.andersson,
linux-scsi, kernel-team
Cc: Alim Akhtar, Avri Altman, James E.J. Bottomley,
Martin K. Petersen, Stanley Chu, Bean Huo, open list
On Wed, 2021-01-27 at 18:49 -0800, Can Guo wrote:
> The initialization of clk_scaling.min_gear was removed by mistake.
> This
> change adds it back, otherwise clock scaling down would fail.
>
> Fixes: 4543d9d78227 ("scsi: ufs: Refactor
> ufshcd_init/exit_clk_scaling/gating()")
>
> Signed-off-by: Can Guo <cang@codeaurora.org>
Reviewed-by: Bean Huo <beanhuo@micron.com>
Tested-by: Bean Huo <beanhuo@micron.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] scsi: ufs: Give clk scaling min gear a value
2021-01-28 2:49 [PATCH v2] scsi: ufs: Give clk scaling min gear a value Can Guo
` (2 preceding siblings ...)
2021-01-28 10:28 ` Bean Huo
@ 2021-01-29 18:44 ` Martin K. Petersen
3 siblings, 0 replies; 6+ messages in thread
From: Martin K. Petersen @ 2021-01-29 18:44 UTC (permalink / raw)
To: Can Guo
Cc: jaegeuk, asutoshd, nguyenb, hongwus, bjorn.andersson, linux-scsi,
kernel-team, Alim Akhtar, Avri Altman, James E.J. Bottomley,
Martin K. Petersen, Stanley Chu, Bean Huo, open list
Can,
> The initialization of clk_scaling.min_gear was removed by mistake. This
> change adds it back, otherwise clock scaling down would fail.
Applied to 5.12/scsi-staging, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-01-29 18:45 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-28 2:49 [PATCH v2] scsi: ufs: Give clk scaling min gear a value Can Guo
2021-01-28 2:59 ` Stanley Chu
2021-01-28 3:28 ` Bjorn Andersson
2021-01-28 3:34 ` Can Guo
2021-01-28 10:28 ` Bean Huo
2021-01-29 18:44 ` Martin K. Petersen
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).