mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/1] scsi: ufs: fix missing clk change notification on host reset
       [not found] <20220711144224.17916-1-powen.kao@mediatek.com>
@ 2022-07-11 14:42 ` Po-Wen Kao
  2022-07-11 17:17   ` Bart Van Assche
                     ` (2 more replies)
  0 siblings, 3 replies; 4+ 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


^ permalink raw reply	[flat|nested] 4+ 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 host reset 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; 4+ 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>

^ permalink raw reply	[flat|nested] 4+ 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 host reset 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; 4+ 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>


^ permalink raw reply	[flat|nested] 4+ 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 host reset 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; 4+ 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-07-14  4:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20220711144224.17916-1-powen.kao@mediatek.com>
2022-07-11 14:42 ` [PATCH 1/1] scsi: ufs: fix missing clk change notification on host reset 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

all inboxes | Powered by JetHome®