mbox series

[v4,0/2] Fixes for UFS clock gating initialization

Message ID 20250128071207.75494-1-avri.altman@wdc.com
Headers show
Series Fixes for UFS clock gating initialization | expand

Message

Avri Altman Jan. 28, 2025, 7:12 a.m. UTC
Martin hi,

This patch series addresses two issues related to the UFS clock gating
mechanism. The first patch ensures that the `clk_gating.lock` is used
only after it has been properly initialized.

The second patch fixes an issue where `clk_gating.state` is toggled even
if clock gating is not allowed, which can lead to crashes.


Changes since v3:
 - rephrase commit log patch #2 (Geert)
 - Add Tested-by tag (Geert)

Changes since v2:
 - Add patch #2 (Geert)
 - Initialize clk_gating.lock unconditionally (Bart)

Changes since v1:
 - move the spin_lock_init(&hba->clk_gating.lock) call from
   ufshcd_init_clk_gating() just before the ufshcd_hba_init() call in
   ufshcd_init() (Bart)


Avri Altman (2):
  scsi: ufs: core: Ensure clk_gating.lock is used only after
    initialization
  scsi: ufs: Fix toggling of clk_gating.state when clock gating is not
    allowed

 drivers/ufs/core/ufshcd.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)