* [PATCH 0/1] Fix missing clk change notification on UFS host reset
@ 2022-07-11 14:42 Po-Wen Kao
2022-07-11 14:42 ` [PATCH 1/1] scsi: ufs: fix missing clk change notification on " Po-Wen Kao
0 siblings, 1 reply; 5+ messages in thread
From: Po-Wen Kao @ 2022-07-11 14:42 UTC (permalink / raw)
To: asutoshd, Matthias Brugger
Cc: wsd_upstream, peter.wang, stanley.chu, powen.kao, alice.chao,
chun-hung.wu, cc.chou, chaotian.jing, jiajie.hao, mason.zhang,
linux-arm-kernel, linux-mediatek
Hi all,
We found UFS host reset flow scale up clk directly without informing
platform driver. On MTK platform, we need to handle the clk change
whenever happends. Please refer to patch for details.
Additionally, we notice QCOM's driver subscribe clk change and set link
to H8 in ufs_qcom_clk_scale_notify(). Not sure if this change could be
an issue for QCOM? Maybe check on hba->ufshcd_state before enter H8?
Comments are appreciated
Po-Wen Kao (1):
scsi: ufs: fix missing clk change notification on host reset
drivers/scsi/ufs/ufshcd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--
2.18.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/1] scsi: ufs: fix missing clk change notification on host reset
2022-07-11 14:42 [PATCH 0/1] Fix missing clk change notification on UFS host reset Po-Wen Kao
@ 2022-07-11 14:42 ` Po-Wen Kao
2022-07-11 17:17 ` Bart Van Assche
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Po-Wen Kao @ 2022-07-11 14:42 UTC (permalink / raw)
To: asutoshd, Alim Akhtar, Avri Altman, James E.J. Bottomley,
Martin K. Petersen, Matthias Brugger
Cc: wsd_upstream, peter.wang, stanley.chu, powen.kao, alice.chao,
chun-hung.wu, cc.chou, chaotian.jing, jiajie.hao, mason.zhang,
linux-scsi, linux-kernel, linux-arm-kernel, linux-mediatek
In ufshcd_host_reset_and_restore(), ufshcd_set_clk_freq() is called
to scale clk rate. However, this did not call vops->clk_scale_notify()
to inform platform driver of clk change.
We propose to call on ufshcd_scale_clks() instead so that clk change
can be properly handled.
Signed-off-by: Po-Wen Kao <powen.kao@mediatek.com>
---
drivers/scsi/ufs/ufshcd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 3f9caafa91bf..3e7af7b11d2e 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -7230,7 +7230,7 @@ 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_set_clk_freq(hba, true);
+ ufshcd_scale_clks(hba, true);
err = ufshcd_hba_enable(hba);
--
2.18.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] scsi: ufs: fix missing clk change notification on host reset
2022-07-11 14:42 ` [PATCH 1/1] scsi: ufs: fix missing clk change notification on " Po-Wen Kao
@ 2022-07-11 17:17 ` Bart Van Assche
2022-07-12 1:30 ` Stanley Chu
2022-07-14 4:22 ` Martin K. Petersen
2 siblings, 0 replies; 5+ messages in thread
From: Bart Van Assche @ 2022-07-11 17:17 UTC (permalink / raw)
To: Po-Wen Kao, asutoshd, Alim Akhtar, Avri Altman,
James E.J. Bottomley, Martin K. Petersen, Matthias Brugger
Cc: wsd_upstream, peter.wang, stanley.chu, alice.chao, chun-hung.wu,
cc.chou, chaotian.jing, jiajie.hao, mason.zhang, linux-scsi,
linux-kernel, linux-arm-kernel, linux-mediatek
On 7/11/22 07:42, Po-Wen Kao wrote:
> In ufshcd_host_reset_and_restore(), ufshcd_set_clk_freq() is called
> to scale clk rate. However, this did not call vops->clk_scale_notify()
> to inform platform driver of clk change.
>
> We propose to call on ufshcd_scale_clks() instead so that clk change
> can be properly handled.
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] scsi: ufs: fix missing clk change notification on host reset
2022-07-11 14:42 ` [PATCH 1/1] scsi: ufs: fix missing clk change notification on " Po-Wen Kao
2022-07-11 17:17 ` Bart Van Assche
@ 2022-07-12 1:30 ` Stanley Chu
2022-07-14 4:22 ` Martin K. Petersen
2 siblings, 0 replies; 5+ messages in thread
From: Stanley Chu @ 2022-07-12 1:30 UTC (permalink / raw)
To: Po-Wen Kao, asutoshd, Alim Akhtar, Avri Altman,
James E.J. Bottomley, Martin K. Petersen, Matthias Brugger
Cc: wsd_upstream, peter.wang, alice.chao, chun-hung.wu, cc.chou,
chaotian.jing, jiajie.hao, mason.zhang, linux-scsi, linux-kernel,
linux-arm-kernel, linux-mediatek
On Mon, 2022-07-11 at 22:42 +0800, Po-Wen Kao wrote:
> In ufshcd_host_reset_and_restore(), ufshcd_set_clk_freq() is called
> to scale clk rate. However, this did not call vops-
> >clk_scale_notify()
> to inform platform driver of clk change.
>
> We propose to call on ufshcd_scale_clks() instead so that clk change
> can be properly handled.
>
> Signed-off-by: Po-Wen Kao <powen.kao@mediatek.com>
> ---
Reviewed-by: Stanley Chu <stanley.chu@mediatek.com>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] scsi: ufs: fix missing clk change notification on host reset
2022-07-11 14:42 ` [PATCH 1/1] scsi: ufs: fix missing clk change notification on " Po-Wen Kao
2022-07-11 17:17 ` Bart Van Assche
2022-07-12 1:30 ` Stanley Chu
@ 2022-07-14 4:22 ` Martin K. Petersen
2 siblings, 0 replies; 5+ messages in thread
From: Martin K. Petersen @ 2022-07-14 4:22 UTC (permalink / raw)
To: asutoshd, Matthias Brugger, Po-Wen Kao, James E.J. Bottomley,
Alim Akhtar, Avri Altman
Cc: Martin K . Petersen, cc.chou, alice.chao, mason.zhang,
stanley.chu, peter.wang, jiajie.hao, linux-mediatek,
chaotian.jing, linux-arm-kernel, linux-scsi, wsd_upstream,
linux-kernel, chun-hung.wu
On Mon, 11 Jul 2022 22:42:23 +0800, Po-Wen Kao wrote:
> In ufshcd_host_reset_and_restore(), ufshcd_set_clk_freq() is called
> to scale clk rate. However, this did not call vops->clk_scale_notify()
> to inform platform driver of clk change.
>
> We propose to call on ufshcd_scale_clks() instead so that clk change
> can be properly handled.
>
> [...]
Applied to 5.19/scsi-fixes, thanks!
[1/1] scsi: ufs: fix missing clk change notification on host reset
https://git.kernel.org/mkp/scsi/c/52a518019ca1
--
Martin K. Petersen Oracle Linux Engineering
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-07-14 4:23 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-11 14:42 [PATCH 0/1] Fix missing clk change notification on UFS host reset Po-Wen Kao
2022-07-11 14:42 ` [PATCH 1/1] scsi: ufs: fix missing clk change notification on " Po-Wen Kao
2022-07-11 17:17 ` Bart Van Assche
2022-07-12 1:30 ` Stanley Chu
2022-07-14 4:22 ` 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).