diff options
| author | Stanley Jhu <stanleyjhu@google.com> | 2026-10-29 15:08:30 +0800 |
|---|---|---|
| committer | Martin K. Petersen (Oracle) <mkp@kernel.org> | 2026-11-03 23:01:14 -0500 |
| commit | 6da1bc55c060bec3163b0e6077f3ac9641f8100c (patch) | |
| tree | 2723546accc6bf9bfccc33ba7685f0468bfb266e /tools/perf/scripts/python | |
| parent | 2b2bb55990cf1d9dbd59ee326d545798061fce97 (diff) | |
scsi: ufs: core: Keep clock-gating hold on failed W-LUN runtime resume
1. __ufshcd_wl_suspend() takes one ufshcd_hold() reference and sets
hba->clk_gating.is_suspended while the UFS device W-LUN enters
RPM_SUSPENDED.
2. Since commit eef1d74bf88f ("PM: runtime: Only set runtime_error on
suspend callback failures"), a failed runtime resume (for example
START STOP UNIT completing with an error) leaves the W-LUN in
RPM_SUSPENDED with power.runtime_error == 0, while
__ufshcd_wl_resume() already clears hba->clk_gating.is_suspended and
calls ufshcd_release().
3. The next W-LUN runtime resume runs __ufshcd_wl_resume() again without
an intervening suspend and calls ufshcd_release() a second time,
dropping a reference it does not own and underflowing
hba->clk_gating.active_reqs on UFSHCD_CAP_CLK_GATING hosts.
Keep hba->clk_gating.is_suspended and the suspend hold across a failed
W-LUN runtime resume, so the hold stays paired with the W-LUN
RPM_SUSPENDED state and the next successful resume releases it.
Fixes: eef1d74bf88f ("PM: runtime: Only set runtime_error on suspend callback failures")
Cc: stable@vger.kernel.org # v7.3+
Signed-off-by: Stanley Jhu <stanleyjhu@google.com>
Reviewed-by: Brian Norris <briannorris@chromium.org>
Reviewed-by: Peter Wang <peter.wang@mediatek.com>
Link: https://patch.msgid.link/20261029040002.2100002-1-stanleyjhu@google.com
Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
