All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] scsi: ufs: core: Fix hibern8 and clock gating state handling
@ 2026-12-02 23:51 Vladimir Zapolskiy
  2026-12-02 23:51 ` [PATCH 1/3] scsi: ufs: core: Set CLKS_ON when ufshcd_gate_work() keeps clocks on Vladimir Zapolskiy
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Vladimir Zapolskiy @ 2026-12-02 23:51 UTC (permalink / raw)
  To: James E.J. Bottomley, Martin K. Petersen, Bart Van Assche
  Cc: Alim Akhtar, Bean Huo, Stanley Jhu, linux-scsi

The UFS core can lose track of the link and clock gating states when a
W-LUN resume fails or when the host is runtime suspended with an active
link. On SM8650 this led to a PHY calibration failure on host reset,
needless UIC errors and stalls of 8 to 11 seconds after every runtime
suspend.

The three fixes are independent of each other and can be applied in any
order:
* set CLKS_ON when ufshcd_gate_work() keeps the clocks on,
* enter hibern8 in ufshcd_gate_work() only on an active link,
* enter hibern8 before ufshcd_suspend() gates the clocks of an active
  link on hosts with UFSHCD_CAP_HIBERN8_WITH_CLK_GATING.

The problems were found during the UFS stress testing on SM8650 (runtime
PM level matrix, LU resets during writes, fatal error injection with
the W-LUN runtime suspended).

Vladimir Zapolskiy (3):
  scsi: ufs: core: Set CLKS_ON when ufshcd_gate_work() keeps clocks on
  scsi: ufs: core: Enter hibern8 in ufshcd_gate_work() only on an active link
  scsi: ufs: core: Enter hibern8 before ufshcd_suspend() gates the clocks

 drivers/ufs/core/ufshcd.c | 31 +++++++++++++++++++++++--------
 1 file changed, 23 insertions(+), 8 deletions(-)

-- 
2.53.0


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

end of thread, other threads:[~2026-12-03  0:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-02 23:51 [PATCH 0/3] scsi: ufs: core: Fix hibern8 and clock gating state handling Vladimir Zapolskiy
2026-12-02 23:51 ` [PATCH 1/3] scsi: ufs: core: Set CLKS_ON when ufshcd_gate_work() keeps clocks on Vladimir Zapolskiy
2026-12-02 23:51 ` [PATCH 2/3] scsi: ufs: core: Enter hibern8 in ufshcd_gate_work() only on an active link Vladimir Zapolskiy
2026-12-02 23:51 ` [PATCH 3/3] scsi: ufs: core: Enter hibern8 before ufshcd_suspend() gates the clocks Vladimir Zapolskiy
2026-12-03  0:14   ` sashiko-bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.